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.

5 Downloads

Updated

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: http://ieeexplore.ieee.org/xpl/articleDetails.jsp?arnumber=6310525

Comments and Ratings (7)

As Has

As Has (view profile)

where is the features vector in the code... i don't understand
plz can you reply

I think this is the original 5X5 matrics [Laws, 1979; Wu et al., 1992]
filters={};
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.% % % % %
clc
clear
GreyImage = imread('yourPic.JPG');
figure;
imshow(GreyImage);
title('Original Grey Image');
[mapz] = laws( GreyImage , 3);//3 is serendipitously choose
for i=1:9
figure;
imshow(mapz{1,i});
end

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

Daniel

Daniel (view profile)

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

Faraz

Faraz (view profile)

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

Error in laws (line 41)
mapz{end+1}=wfusmat(filtered2D{2},filtered2D{5},'mean');

nick

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