Code covered by the BSD License  

Highlights from
A Luminance and Contrast Invariant

2.0

2.0 | 1 rating Rate this file 7 Downloads (last 30 days) File Size: 2.36 KB File ID: #13626

A Luminance and Contrast Invariant

by Madhu S. Nair

 

11 Jan 2007 (Updated 12 Jan 2007)

Luminance Contrast Invariant Edge Detection

| Watch this File

File Information
Description

Luminance Contrast Invariant Edge Detection

Required Products Image Acquisition Toolbox
MATLAB release MATLAB 7 (R14)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (1)
07 Apr 2007 Dimitri Shvorob

Madhu, are you aware of FOR..END loop? If yes, why write something like

% 0 degrees
h1m0=h1m;
h1v0=reshape(h1m0,ws*ws,1);
h2m0=imrotate(h1m0,90,'crop');
h2v0=reshape(h2m0,ws*ws,1);
[ertot(1) e2er e3er e2cm e3cm a21 a22 a31 a32]=errortot(e2v,e3v,e2m,e3m,h1v0,h2v0,h1m0,h2m0);

% 45 degrees
h1m45=imrotate(h1m,45,'crop');
h1v45=reshape(h1m45,ws*ws,1);
h2m45=imrotate(h1m45,90,'crop');
h2v45=reshape(h2m45,ws*ws,1);
[ertot(2) e2er e3er e2cm e3cm a21 a22 a31 a32]=errortot(e2v,e3v,e2m,e3m,h1v45,h2v45,h1m45,h2m45);

% 90 degrees
h1m90=imrotate(h1m,90,'crop');
h1v90=reshape(h1m90,ws*ws,1);
h2m90=imrotate(h1m90,90,'crop');
h2v90=reshape(h2m90,ws*ws,1);
[ertot(3) e2er e3er e2cm e3cm a21 a22 a31 a32]=errortot(e2v,e3v,e2m,e3m,h1v90,h2v90,h1m90,h2m90);

% 135 degrees
h1m135=imrotate(h1m,135,'crop');
h1v135=reshape(h1m135,ws*ws,1);
h2m135=imrotate(h1m135,90,'crop');
h2v135=reshape(h2m135,ws*ws,1);
[ertot(4) e2er e3er e2cm e3cm a21 a22 a31 a32]=errortot(e2v,e3v,e2m,e3m,h1v135,h2v135,h1m135,h2m135);

The code is nominally a function, but really a script spawning windows, printing numbers, etc. It can be useful, but you might want to clean it up, and add 'help'. Did you notice that your submission's title is truncated? Do you care to correct it?

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
image analysis Madhu S. Nair 22 Oct 2008 08:56:18
luminance contrast invariant edge detection Madhu S. Nair 22 Oct 2008 08:56:18

Contact us at files@mathworks.com