4

Let's say we have a number of color images that are examples of some textured pattern. There is a rare occurrence where this texture is "disrupted" by some foreign object. What would be the best way to detect these rare anomalies?

I thought about training a CNN, but the number of good examples vastly outnumbers the bad examples, so I have my doubts. I started looking into grey level co-occurrence matrices (GLCM) and local binary patterns (LBP), but I think color information could play an important part in determining the occurrence of a disruption. Could I find the distribution from these extracted features (of either GLCM or LBP) and calculate the probability that a new image belongs to this distribution?

Thanks for your help!

Tonechas
  • 13,398
  • 16
  • 46
  • 80
Brad Flynn
  • 145
  • 8
  • 1
    Could you share some sample images? – Tonechas May 24 '17 at 11:34
  • @tonechas Unfortunately I cannot, this is about as specific as I can get about the problem – Brad Flynn May 24 '17 at 12:23
  • 1
    It's hard to answer the question without more info, but have you looked at Law's texture measures? Oldies but potentially useful. Whatever technique may work will depend on your application. Natural or manufactured objects/scenes? Live images from cameras, or image files of varying resolution/quality? If you can't reveal details, then consider spending a day at your local engineering library looking through textbooks, theses, and conference papers (which are often behind paywalls online). On several occasions I've found little-mentioned books that helped me address weird problems. – Rethunk May 25 '17 at 17:02

1 Answers1

4

It is difficult to figure out your problem without seeing some sample images. In principle there's a wide variety of approaches you could use to detect texture disruption, namely GLCM features, LBPs, Law's masks, vector quantization, etc. Measuring the local entropy is a possible way to go. Consider the image below, in which we can clearly distinguish two types of texture:

square textured object on a textured background

The following snippet reads the image, computes the local entropy for each pixel on a circular neighbourhood or a given radius 25 and displays the results:

from skimage import io
from skimage.filters.rank import entropy
from skimage.morphology import disk

img = io.imread('https://i.stack.imgur.com/Wv74a.png')
R = 25
filtered = entropy(img, disk(R))
io.imshow(filtered)

It clearly emerges from the resulting entropy map that the local entropy values could be utilized to detect texture disruption.

local entropy values

Tonechas
  • 13,398
  • 16
  • 46
  • 80