|
|
 |
NAME hurst
SYNOPSIS
#include <libimg.h>
void hurst(src, dst, lines)
sep uchar src[]; /* source image */
sep uchar dst[]; /* destination image */
uint lines; /* number of lines to work on */
MEMORY CONSUMPTION
This function consumes about 274 lines of IMAP memory
DESCRIPTION
Performs the Hurst operator. It calculates in each area (a,b,c,d,e,f,g,h) the difference between the brightest and darkest pixel (the range). Then it fits a line (using the Least Square Fit; see below) through the log(distance from central pixel to area) andlog(range). The slope of this line is used to represent the roughness of the area.
The Hurst operator converses the original image to one whose texture information permits thresholding of the regions.
h g h log(distance ab) = 0
f e d e f log(distance ac) = 16
h e c b c e h log(distance ad) = 32
g d b a b d g log(distance ae) = 37
h e c b c e h log(distance af) = 48
f e d e f log(distance ag) = 51
h g h log(distance ah) = 53
The log(distance is multiplied by 46 to get integers. By knowing these values the denominator can be calculated. The value of the denominator is 16313.
---
--- ---
\ \ \
n* > log(r)*log(d) - > log(d) * > log(r)
/ / /
--- --- ---
slope =======================================================
--- ---
\ 2 \ 2
n* > log(d ) -{ > log(d)}
/ /
--- ---
r = range
d = distance
n = number of areas (in this case 7)
EXAMPLE

Original Image
|

Hurst operator
|
| Total execution time: 3.682 ms |
back to 'public library'
|
 |
 |