Functions

Other Domain Transform Operations
[Image Processing]

Collaboration diagram for Other Domain Transform Operations:

Functions

int imProcessHoughLines (const imImage *src_image, imImage *dst_image)
int imProcessHoughLinesDraw (const imImage *src_image, const imImage *hough, const imImage *hough_points, imImage *dst_image)
void imProcessCrossCorrelation (const imImage *src_image1, const imImage *src_image2, imImage *dst_image)
void imProcessAutoCorrelation (const imImage *src_image, imImage *dst_image)
void imProcessDistanceTransform (const imImage *src_image, imImage *dst_image)
void imProcessRegionalMaximum (const imImage *src_image, imImage *dst_image)

Detailed Description

Hough, Distance.

See im_process_glo.h


Function Documentation

int imProcessHoughLines ( const imImage src_image,
imImage dst_image 
)

Hough Lines Transform.
It will detect white lines in a black background. So the source image must be a IM_BINARY image with the white lines of interest enhanced. The better the threshold with the white lines the better the line detection.
The target image must have IM_GRAY, IM_INT, hg_width=180, hg_height=2*rmax+1, where rmax is the image diagonal/2 (rmax = srqrt(width*width + height*height)).
The hough transform defines "cos(theta) * X + sin(theta) * Y = rho" and the parameters are in the interval:
theta = "0 .. 179", rho = "-hg_height/2 .. hg_height/2" .
Where rho is the perpendicular distance from the center of the image and theta the angle with the normal. So do not confuse theta with the line angle, they are perpendicular.
Returns zero if the counter aborted.
Inspired from ideas in XITE, Copyright 1991, Blab, UiO
http://www.ifi.uio.no/~blab/Software/Xite/
Not using OpenMP when enabled.

im.ProcessHoughLines(src_image: imImage, dst_image: imImage) -> counter: boolean [in Lua 5] 
im.ProcessHoughLinesNew(image: imImage) -> counter: boolean, new_image: imImage [in Lua 5] 
int imProcessHoughLinesDraw ( const imImage src_image,
const imImage hough,
const imImage hough_points,
imImage dst_image 
)

Draw detected hough lines.
The source and target images can be IM_MAP, IM_GRAY or IM_RGB, with data type IM_BYTE.
Can be done in-place.
If the hough transform is not NULL, then the hough points are filtered to include only lines that are significally different from each other.
The hough image is the hough transform image, but it is optional and can be NULL. If not NULL then it will be used to filter lines that are very similar.
The hough points image is a hough transform image that was thresholded to a IM_BINARY image, usually using a Local Max threshold operation (see imProcessLocalMaxThreshold). Again the better the threshold the better the results.
The detected lines will be drawn using a red color. If the target image is IM_GRAY, it will be changed to IM_MAP.
If the target image is IM_RGB, then only the red plane will be changed. Returns the number of detected lines.
Not using OpenMP when enabled.

im.ProcessHoughLinesDraw(src_image: imImage, hough: imImage, hough_points: imImage, dst_image: imImage) -> lines: number [in Lua 5] 
im.ProcessHoughLinesDrawNew(image: imImage, hough: imImage, hough_points: imImage) -> lines: number, new_image: imImage [in Lua 5] 
void imProcessCrossCorrelation ( const imImage src_image1,
const imImage src_image2,
imImage dst_image 
)

Calculates the Cross Correlation in the frequency domain.
CrossCorr(a,b) = IFFT(Conj(FFT(a))*FFT(b))
Images must be of the same size and only target image must be of type complex.

im.ProcessCrossCorrelation(src_image1: imImage, src_image2: imImage, dst_image: imImage) [in Lua 5] 
im.ProcessCrossCorrelationNew(image1: imImage, image2: imImage) -> new_image: imImage [in Lua 5] 
void imProcessAutoCorrelation ( const imImage src_image,
imImage dst_image 
)

Calculates the Auto Correlation in the frequency domain.
Uses the cross correlation. Images must be of the same size and only target image must be of type complex.

im.ProcessAutoCorrelation(src_image: imImage, dst_image: imImage) [in Lua 5] 
im.ProcessAutoCorrelationNew(image: imImage) -> new_image: imImage [in Lua 5] 
void imProcessDistanceTransform ( const imImage src_image,
imImage dst_image 
)

Calculates the Distance Transform of a binary image using an aproximation of the euclidian distance.
Each white pixel in the binary image is assigned a value equal to its distance from the nearest black pixel.
Uses a two-pass algorithm incrementally calculating the distance.
Source image must be IM_BINARY, target must be IM_FLOAT.

im.ProcessDistanceTransform(src_image: imImage, dst_image: imImage) [in Lua 5] 
im.ProcessDistanceTransformNew(image: imImage) -> new_image: imImage [in Lua 5] 
void imProcessRegionalMaximum ( const imImage src_image,
imImage dst_image 
)

Marks all the regional maximum of the distance transform.
source is IMGRAY/IM_FLOAT target in IM_BINARY.
We consider maximum all connected pixel values that have smaller pixel values around it.

im.ProcessRegionalMaximum(src_image: imImage, dst_image: imImage) [in Lua 5] 
im.ProcessRegionalMaximumNew(image: imImage) -> new_image: imImage [in Lua 5]