- Morphological operations: https://in.mathworks.com/help/images/morphological-filtering.html
- Structuring Elements: https://in.mathworks.com/help/images/structuring-elements.html
Binarizing image with single pixels
1 回表示 (過去 30 日間)
古いコメントを表示
I have some photos of random pixels marked on a low noisy background. I want to binarize the image, in order to have a clear array of 0s and 1s, and I would like to make each spot as one element of the matrix.
What I did was to grayscale the image, and then try to binarize it. Unfortunately, it is not enough. Adding Adaptive histeresys equalisation (Ae = adapthisteq(Ag);) makes it worst. Maybe strel function could help?
Thanks
This is my code. I think code will be similar to datamatrix and QR code reading.
Thank you
if dim ~= 1
Ag = rgb2gray(photo);
else
Ag = photo;
end
Ab=imbinarize(Ag);
0 件のコメント
回答 (1 件)
Animesh
2024 年 1 月 30 日
Hi @Mat
If you're working with an image that has random pixels against a faintly noisy background and wish to detect those random pixels, you can employ morphological operations to enhance the features of the spots and distinguish them from the background noise.
A suggested approach you can try is:
Step 1: Convert the image to greyscale (if not already).
Step 2: Apply a filter to reduce noise.
Step 3: Binarize the image using thresholding.
Step 4: Use morphological operations to clean up the image and isolate the spots.
You can refer to the following documentation on morphological operations:
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で 3-D Volumetric Image Processing についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!