user1196549
user1196549

Reputation:

Segmenting a textured area based on a sample

I need to process pictures where textured areas appear, such as cloth.

Assuming that I know a region of interest that contains a sample of the texture, I need to delineate more precisely the whole area having that texture.

The scale of the texture can vary from microtexture to large patches, but a partial solution would be better than none.

What are the relevant tools that I could use in OpenCV ?

For the sake of the illustration (I don't really expect such an accuracy):

enter image description here

enter image description here

enter image description here


The original images (sorry, I lost the first and put another):

enter image description here

enter image description here

enter image description here

Upvotes: 4

Views: 217

Answers (1)

Renat Gilmanov
Renat Gilmanov

Reputation: 17895

Multi-colour image segmentation seems to work, so potentially, if an environment allows, it might be easier to use known texture to extract colours and do the segmentation. Here is an example:

enter image description here

The result is pretty accurate. A custom implementation of multi-colour segmentation based on delta E were used. Common approach works and it also allows to highlight some internal details.

enter image description here

The shape is not ideal, there are some artefacts, so potentially a better result can be achieved.

enter image description here

BTW, I'd suggest to improve input data quality. I used to work with 4K video frames because details really matter. More examples can be found on youtube channel.

Upvotes: 1

Related Questions