Image processing: Is there a way to edit pixels based on neighbouring adjacent pixels?
Show older comments
Hi, I'm doing some image processing with CT Scans and i want to separate the 3 main components sand, empty, calcite precipitation

Now, i used multithresh to convert it to RGB with 3 colours to visualize it and count the different colour pixels to calculate Area percentage of the components.

This is not optimal yet, because there are a lot of small red islands of calcite being misidentified in the middle of the yellow sand grains. I tried to remedy that by gaussian smoothing of the original (result below)

This is still not optimal, and I'd rather use something like bwareaopen (if there is something like that with RGB) to remove small 1or 2-pixel disturbances surrounded by pixels of another colour, or edit pixels based on surrounding pixels, so let's say if there is 6 of the 8 surrounding pixels of a different colour, the pixel is converted into that colour.
Is it possible to do that or to solve this in a different way? Use another kind of smoothing maybe?
Accepted Answer
More Answers (0)
Categories
Find more on Images in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!