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