I have a data set of images for classification task.

I read some articles about image reprocessing (before training CNN models) which summarize in those steps:

  1. scale image values (img / 255.0)

  2. remove noise (using Gaussian blur)

  3. morphology

I'm not sure when to use each step and what is the right order of those steps:

  1. Do we need to remove noise before scaling images ? (or it dosn't matter) ?

  2. I didn't found many articals about morphology step:

    2.1 When will we use morphology ? (Is it always right to use this reprocessing step ?

    2.2 What is the right order ? use morphology after scaling and removing noise ?


1 Answer 1


I assume you talking about preprocessing instead reprocessing.

  1. Divided the image with 255.0 value is a normalization technic called min/max normalization. Like the other normalization methods, min/max normalization used to improve performance of CNN's.

  2. Image process methods like gaussian blur, average filter etc. are using to remove the noise as you said. You might want to denoise your input image to avoid performance losses.

  3. Using purpose of morphology methods are depends on what is your data and what do you want to do your dataset with these methods. You can refer this link to see the methods that cv2 shared with code snippets.


  • $\begingroup$ Is there any order we need to follow ? Normalize before removing noise ? And removing noise before morphology ? $\endgroup$ May 10, 2021 at 12:10
  • 1
    $\begingroup$ My suggestion based my experiences would be that removing noise - morphology - normalize. It's because you might want to remove noise before doing something on the image avoid getting misleading results. After that make the morphology process and finish your preprocess step. Normalization would be the last step on your situation. After normalization you can pass your processed image to your model and your GPU as tensor. This pipeline is representing how you pass your image into your model, on the different situations, this pipeline would be changed. $\endgroup$
    – spawnfile
    May 12, 2021 at 23:59

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.