Image Processing Library User Manual
The image processing library works on images of dimension 720 pixels width and 486 pixels height. This provides the main common functions to process images such as dilate, erode, edges detection, grey level extension, median filter, and skeletonization.
List of functions
sobel
gray_level_extension
median_filter
dilate
erode
skeletonization
skel_Hilditch
sobel
Synopsis
#inlcude”ImageProcessing.h”
void sobel (unsigned char * p_image_in, unsigned char * p_image_out, int thresh)
Description
The sobelfunction is an edge detection filter. It detects the object’s edges of an image (p_image_in).
-p_image_in is the processed input image’s address.
-p_image_out is the processed output image’s address.
-thresh is the threshold value. If the gradient’s magnitude is greater than the user-specified threshold, the pixel is considerate as an edge.
The function works on image with dimension 720*486 pixels.
Error Conditions
The sobelfunction does not return an error condition.
gray_level_extension
Synopsis
# inlcude”ImageProcessing.h”
void gray_level_extension(unsigned char * p_image)
Description
The gray_level_extensionfunction increases the contrast and the visibility of the image. The image’s grey level is extended to the whole grey level range.It is one of the most useful operations to improve pictures from digital cameras.
-p_image is the processed input image’s address.
The function works on image with dimension 720*486 pixels.
Error Conditions
The gray_level_extensionfunction does not return an error condition.
median_filter
Synopsis
# inlcude”ImageProcessing.h”
void median_filter (unsigned char* in, unsigned char *out )
Description
The median_filterfunction smoothes the data while keeping the small and sharp details. It is used to remove the salt and pepper noise andit uses a neighborhood 3 by 3.
-in is the processed input image’s address.
-out is the processed output image’s address.
The function works on image with dimension 720*486 pixels.
Error Conditions
The median_filterfunction does not return an error condition.
dilate
Synopsis
# inlcude”ImageProcessing.h”
void dilate(unsigned char * p_image_in, unsigned char * p_image_out)
Description
The dilate function expands the objects by one layer of pixels.
-p_image_in is the processed input image’s address.
-p_image_out is the processed output image’s address.
The function works on image with dimension 720*486 pixels.
Error Conditions
The dilate function does not return an error condition.
erode
Synopsis
# inlcude”ImageProcessing.h”
void erode (unsigned char * p_image_in, unsigned char * p_image_out)
Description
The erodefunction shrinks the objects by one layer of pixels.
-p_image_in is the processed input image’s address.
-p_image_out is the processed output image’s address.
The function works on image with dimension 720*486 pixels.
Error Conditions
The erodefunction does not return an error condition.
skeletonization
Synopsis
# inlcude”ImageProcessing.h”
void skeletonization (unsigned char * p_image)
Description
The skeletonizationfunction erodes the objectuntil it remains only lines with a thickness of 1. This function gives better results than the skel_Hilditch function.
-p_image is the processed input image’s address.
The function works on image with dimension 720*486 pixels.
Error Conditions
The skeletonizationfunction does not return an error condition.
skel_Hilditch
Synopsis
# inlcude”ImageProcessing.h”
void skel_Hilditch(unsigned char * p_image)
Description
The skel_Hilditch function erodes the objectuntil it remains only lines with a thickness of 1. This function uses the Hilditch’s algorithm and gives worse results than the skeletonization function.
-p_image is the processed input image’s address.
The function works on image with dimension 720*486 pixels.
Error Conditions
The skel_Hilditch function does not return an error condition.