/* * File: imageFilterTools.h * Author: Bartłomiej Kwiatek * * Created on 14 październik 2012, 21:12 */ #ifndef PXMFILTERS_H #define PXMFILTERS_H #include "imageColorPPM.h" #include "imageGryscalePGM.h" #include "imageIntegral.h" /* binaryzacja */ void mediana_filter(BK_imageGryscalePGM *imgInput, BK_imageGryscalePGM *imgOutput, int size); void mediana_filter_color(BK_imageColorPPM *imgInput, BK_imageColorPPM *imgOutput, int size); void breadley_method(BK_imageGryscalePGM *imgInput, BK_imageIntegral *imgIntegral, BK_imageGryscalePGM *imgOutput, float T); void sauvolas_method(BK_imageGryscalePGM *imgInput, BK_imageIntegral *imgIntegral1, BK_imageIntegral *imgIntegral2, BK_imageGryscalePGM *imgOutput, int n, float k); void clasters(BK_imageGryscalePGM *imgInput, BK_imageIntegral *imgIntegral1, BK_imageIntegral *imgIntegral2, BK_imageGryscalePGM *imgOutput, int claster_width, int claster_height, int claster_T); void prelocation(BK_imageGryscalePGM *imgInput, BK_imageGryscalePGM *imgOutput, char *filenameBase, int width_start, int width_end, int height_start, int height_end, int labelMinSize); /* narzędzia */ unsigned int findLabel(unsigned int p, unsigned int* test); /* converters */ void convert_color_image_to_gryscale(BK_imageColorPPM *colorImg, BK_imageGryscalePGM *gryscaleImg); void convert_color_image_to_wb(BK_imageColorPPM *colorImg, BK_imageGryscalePGM *wbImg); void convert_gryscale_image_to_wb(BK_imageGryscalePGM *gryscaleImg, BK_imageGryscalePGM *wbImg); void convert_gryscale_image_to_color(BK_imageGryscalePGM *gryscaleImg, BK_imageColorPPM *colorImg); /* resizers */ void resize_gryscale_image(BK_imageGryscalePGM *gryscaleInImg, BK_imageGryscalePGM *gryscaleOutImg, int widthIn, int heightIn, int widthOut, int heightOut); void resize_color_image(BK_imageColorPPM *colorInImg, BK_imageColorPPM *colorOutImg, int widthIn, int heightIn, int widthOut, int heightOut); /* filters */ void filter_gryscale_image_at_color_params(BK_imageGryscalePGM *imgInput, BK_imageColorPPM *colorImg, BK_imageGryscalePGM *imgOutput, int filterR); void filter_color_image(BK_imageColorPPM *colorInImg, BK_imageColorPPM *colorOutImg, int r, int g, int b); void filter_color_pixel(unsigned char *pixelIn, unsigned char *pixelOut, int r, int g, int b); void filter_color_image_to_red(BK_imageColorPPM *colorInImg, BK_imageColorPPM *colorOutImg); void filter_color_image_to_green(BK_imageColorPPM *colorInImg, BK_imageColorPPM *colorOutImg); void filter_color_image_to_blue(BK_imageColorPPM *colorInImg, BK_imageColorPPM *colorOutImg); void filter_color_image_to_cyan(BK_imageColorPPM *colorInImg, BK_imageColorPPM *colorOutImg); void filter_color_image_to_magenta(BK_imageColorPPM *colorInImg, BK_imageColorPPM *colorOutImg); void filter_color_image_to_yellow(BK_imageColorPPM *colorInImg, BK_imageColorPPM *colorOutImg); #endif /* PXMFILTERS_H */