Using Data to reconstruct an image

4 visualizzazioni (ultimi 30 giorni)
David Harra
David Harra il 17 Ago 2022
Risposto: sudobash il 19 Ago 2022
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 :)

Risposta accettata

sudobash
sudobash il 19 Ago 2022
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!

Più risposte (0)

Prodotti


Release

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by