File Exchange

image thumbnail

Law's Texture Filter

version 1.0 (1.4 KB) by

Implementation of Law's texture filter from 1980, input is an image and output 6 filtered maps.



View License

Law's image filter. For further segmentation based on it, you need to move around a sliding windows and locally calculate histogram for that window and perform clustering of these histograms, or any other technique. If there is demand, I will implement also the segmentation. Otherwise it is implemented according to Shapiro's Computer Vision book.

It is free for any use. If you use it, please cite:

Comments and Ratings (6)

I think this is the original 5X5 matrics [Laws, 1979; Wu et al., 1992]
    filters{1}=[1 4 6 4 1];
    filters{2}=[-1 -2 0 2 1];
    filters{3}=[-1 0 2 0 -1];
    filters{4}=[1 -4 6 -4 1];
    filters{5}=[-1 2 0 -2 -1];

% % % % If you wanna test the code, I've written it for you.% % % % %
GreyImage = imread('yourPic.JPG');
title('Original Grey Image');
[mapz] = laws( GreyImage , 3);//3 is serendipitously choose
for i=1:9

Error in Line 16:
 filters{1}=[1 4 6 4 2];
it has to be "[1 4 6 4 1];


Daniel (view profile)

Requires the wavelet toolbox to run (uses the wfusmat function)


Faraz (view profile)

Undefined function 'wfusmat' for input arguments of type 'double'.

Error in laws (line 41)


nick (view profile)

Hello, i am new in matlab and i have a question for the above code.Can you please tell me how to show the images that you have avatar with this code?

MATLAB Release
MATLAB 8.0 (R2012b)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video