Clear Filters
Clear Filters

Hair Shadow Removal.

3 views (last 30 days)
Mohammed Rayeez Rafeeque
Mohammed Rayeez Rafeeque on 30 Jan 2022
Answered: Ayush Anand on 3 Dec 2023
I am trying to remove shadow of hair for a medical imaging process by HDR bracketing. I have exposure stacks of images of the skin but giving different exposures on the images is not effective enough to hide the shadow.
I use the code given below to work on it;
expTimes = [1.5000 2.0000 2.5000 3.0000 3.5000 4.0000 4.5000];
HDR = makehdr(files,'RelativeExposure',expTimes./expTimes(1));
rgb = tonemap(HDR);
imshow(rgb)
It would be great if you could share some points if not by HDR bracketing, but any other method to solve the issue.
  2 Comments
DGM
DGM on 30 Jan 2022
Attach the original image instead of a screenshot.
Is that the source image or the tonemapped image?
Mohammed Rayeez Rafeeque
Mohammed Rayeez Rafeeque on 17 Feb 2022
I have attached the tonemapped image here and i have even tried this after cropping the images and feeding the cropped ones with different exposures. Well, this image is a result of tonemapping and makehdr function. I hope you could help me out

Sign in to comment.

Answers (1)

Ayush Anand
Ayush Anand on 3 Dec 2023
Hi,
I understand you are trying to use HDR bracketing for removing shadows from hair in medical imaging, and want to alternate methods possible. You can use the following image processing techniques to reduce or eliminate shadows from hair:
  1. Frequency Domain Filtering: Shadows often have specific frequency characteristics. By applying a high-pass filter, you can sometimes remove low-frequency shadow components while preserving the high-frequency details of the skin texture.
  2. Illumination Correction:Use techniques like homomorphic filtering, which is designed to correct non-uniform illumination in images. This method can enhance contrast while reducing the influence of lighting variations.
  3. Inpainting: If the shadows are not too large, you can use inpainting techniques to reconstruct the shadowed areas based on the surrounding skin texture.
  4. Machine Learning Approaches: Train a machine learning model, such as a convolutional neural network (CNN), to recognize and remove shadows from images. This requires a dataset of images with and without shadows for training.
  5. Reflectance Modeling: Use a reflectance model to separate the illumination component from the reflectance component in the image. By manipulating the illumination component, you may reduce the appearance of shadows.
  6. Adaptive Histogram Equalization: Apply local contrast enhancement techniques like CLAHE (Contrast Limited Adaptive Histogram Equalization) to improve the visibility of features in shadowed regions.
You can refer to the following for more insight:
  1. Correct Nonuniform Illumination and Analyze Foreground Objects in MATLAB: https://www.mathworks.com/help/releases/R2021b/images/correcting-nonuniform-illumination.html
  2. Contrast-limited adaptive histogram equalization (CLAHE): https://www.mathworks.com/help/releases/R2021b/images/ref/adapthisteq.html
  3. Inpainting: https://www.mathworks.com/matlabcentral/fileexchange/50366-inpainting
I hope this helps!

Products


Release

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!