I'm trying to replicate an augmentation technique used in this paper. This is how they explain the procedure:

[...] the augmentation technique was used to adjust the histogram because the intensity of the image was different depending on the patient and the MRI equipment. The intensity range is obtained from the whole image as a histogram. And the augmentation was performed by dividing it into five categories: dark distribution, median brightness distribution, bright distribution, average of all distributions and original image. In this process, three brightest, darkest, and intermediate brightness images were extracted, and the average of three histograms was calculated and expressed as a sum of the normal distributions. This intensity adjustment augmentation is applied randomly. In four adjustment cases except for the original is selected, match the histogram of the input image with the representative histogram distribution. By using the above two techniques [...] the number of images used for learning can be increased by [...] 5 times by brightness control

I know that one can get the histogram from an image (first step). But, how can I get those three categories (dark distribution, median brightness distribution and bright distribution) from the same image?

Images are in grayscale and I'm working this project on Pytorch. If someone has done this with PIL, Numpy or similar it would be great.

  • $\begingroup$ Welcome to DataScienceSE. As far as I understand the 5 categories are obtained by splitting the histogram into 5 parts, and assuming that these 5 parts are equal intervals this is equivalent to doing the histogram with exactly five bins. The rest of the explanation is not clear to me, I'm not sure that this description is enough to reproduce the process unless the code is provided. $\endgroup$
    – Erwan
    Jul 4 at 10:31
  • $\begingroup$ @Erwan That's all the information that they provided about the procedure, no code provided or more detail. I'll try splitting the histogram, thanks! $\endgroup$ Jul 4 at 18:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.