Medical image processing - non-local mean filter, OpenCV on/off operation, OTSU threshold segmentation algorithm


foreword

When reading papers related to medical image processing, I encountered some image processing methods that I did not understand very well. I consulted relevant materials and made a simple summary after learning.


1. Non-local Mean Filter (NLM)

NLM is an image denoising algorithm, which can remove redundant information in the image and retain as many details of the image as possible; generally divided into pixel-based and block-based processing methods, the latter has better denoising effect and computational efficiency higher.

code reference

Python code 1
Python code 2
MATLAB code
integral image acceleration MATLAB code calculation

2. OpenCV on/off operation

The "opening operation" appeared in the paper. After consulting the information, I learned that it is actually an image processing method of the OpenCV library, which performs morphological operations on the binarized image.

1. Open operation

"Corrosion first and then expansion" can eliminate small objects
Reference code:
Python code: Repair damaged photos

2. Close operation

"Expand first and then corrode", which can fill small holes in objects, connect adjacent objects and smooth boundaries.
Reference code:
Python code to realize open/close operation

3. OTSU Threshold Segmentation Algorithm

This algorithm is a segmentation algorithm for adaptively determining the image binarization threshold, which was proposed by Japanese scholar Otsu in 1979. The core idea of ​​the algorithm is that the variance between classes is the largest. According to the grayscale characteristics of the image, the image is divided into two parts: background and foreground. When the variance between classes is the largest, it means that the probability of misclassification is the smallest. According to the number of categories, it can be divided into single-threshold and multi-threshold OTSU algorithms.
Reference code:
Python code: single threshold/multi-threshold/genetic algorithm solution OTSU
Python code from GitHub

Summarize

A good memory is not as good as a bad pen, organize frequently and record more!

Guess you like

Origin blog.csdn.net/weixin_41698730/article/details/113754214
Recommended