Using Data to reconstruct an image

4 ビュー (過去 30 日間)
David Harra
David Harra 2022 年 8 月 17 日
回答済み: sudobash 2022 年 8 月 19 日
I have 2 images of grains, one that contains smaller and one that contains significanlty larger. Each material is achieved via a rectilinear grid of coordinates. I want to merge the 2 images into one, in such a way I can remove an area of smaller grains and replace them by one of the larger features. I am wondering if anyone knows any methods or has came across examples like this? The end goal would be to have large features surrounded by all the smaller ones. The two images can be seen below to visualise it better
Any help would be greatly appreciated.
Dave :)

採用された回答

sudobash
sudobash 2022 年 8 月 19 日
Hello!
As per my understanding, the output image needs to have some large blobs of the second image with all the other pixels from the first image.
You could segment out the large blob from the second image and superimpose it onto the first image.
Approach 1:
If all the colours on the second image are unique, then you could simply create a mask and set the pixel value of the mask to your desired colour on the first image.
Approach 2:
If all the colours on the second image are not unique, you could use watershed segmentation to obtain each region. After which, create a mask and set the pixel value of the mask to your desired colour on the first image.
Hope this helps!

その他の回答 (0 件)

製品


リリース

R2022a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by