Effacer les filtres
Effacer les filtres

Pattern Extraction from an image?

2 vues (au cours des 30 derniers jours)
Niranjan
Niranjan le 6 Fév 2011
Hi can anyone suggest me a code to extract a particular texture or pattern from an image? I have the location (x,y) of the pattern to be extracted. All I need to do is to extract this pattern and search the entire image for such repeated patterns.Can anyone suggest me an idea for that? Thanks in advance.

Réponse acceptée

David Young
David Young le 6 Fév 2011
You can pull out the part of the image round location (x,y) like this:
pattern = image(y-h:y+h, x-h:x+h);
This assumes that the pattern is a square patch of the image centred on (x,y), and that the size of the pattern is (2*h+1) by (2*h+1).
There are many ways to search for this pattern in this image or in another image, but perhaps the best thing to start with would be normxcorr2, if you have the Image Processing Toolbox. Have a look at doc normxcorr2 and try it out.
  1 commentaire
Niranjan
Niranjan le 7 Fév 2011
All I need to do is to detect a face of a person in an image, extract his face pixel and scan the rest of the image to find the same pixel ie,to find his leg or hands in the image.How can I do this in matlab? any help?

Connectez-vous pour commenter.

Plus de réponses (1)

Niranjan
Niranjan le 7 Fév 2011
All I need to do is to detect a face of a person in an image, extract his face pixel and scan the rest of the image to find the same pixel ie,to find his leg or hands in the image.How can I do this in matlab? any help?

Community Treasure Hunt

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

Start Hunting!

Translated by