Changeset 482


Ignore:
Timestamp:
May 30, 2005, 5:22:02 PM (15 years ago)
Author:
Sam Hocevar
Message:
  • filter_equalize -> filter_threshold
Location:
pwntcha/trunk/src
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • pwntcha/trunk/src/authimage.c

    r448 r482  
    4343    filter_scale(tmp, 2.0);
    4444    getpixel(tmp, 0, 0, &r, &g, &b);
    45     filter_equalize(tmp, r * 3 / 4);
     45    filter_threshold(tmp, r * 3 / 4);
    4646    filter_smooth(tmp);
    47     filter_equalize(tmp, 220);
     47    filter_threshold(tmp, 220);
    4848
    4949    for(i = 0; i < 6; i++)
  • pwntcha/trunk/src/clubic.c

    r448 r482  
    3333
    3434    tmp = image_dup(img);
    35     filter_equalize(tmp, 200);
     35    filter_threshold(tmp, 200);
    3636    find_glyphs(tmp);
    3737
  • pwntcha/trunk/src/common.h

    r477 r482  
    7373void filter_black_stuff(struct image *img);
    7474void filter_detect_lines(struct image *img);
    75 void filter_equalize(struct image *img, int threshold);
     75void filter_threshold(struct image *img, int threshold);
    7676void filter_trick(struct image *img);
    7777void filter_smooth(struct image *img);
  • pwntcha/trunk/src/filter.c

    r452 r482  
    202202}
    203203
    204 void filter_equalize(struct image *img, int threshold)
     204void filter_threshold(struct image *img, int threshold)
    205205{
    206206    struct image *dst;
  • pwntcha/trunk/src/linuxfr.c

    r448 r482  
    4444
    4545    tmp = image_dup(img);
    46     filter_equalize(tmp, 150);
     46    filter_threshold(tmp, 150);
    4747
    4848    for(y = 0; y < tmp->height; y++)
  • pwntcha/trunk/src/livejournal.c

    r477 r482  
    3838//    filter_smooth(tmp);
    3939//    filter_contrast(tmp);
    40     filter_equalize(tmp, 128);
     40    filter_threshold(tmp, 128);
    4141image_save(tmp, "foo.bmp");
    4242    find_glyphs(tmp);
  • pwntcha/trunk/src/phpbb.c

    r448 r482  
    4545
    4646    filter_smooth(tmp1);
    47     filter_equalize(tmp1, 128);
     47    filter_threshold(tmp1, 128);
    4848
    4949    for(x = 0; x < img->width; x++)
  • pwntcha/trunk/src/slashdot.c

    r448 r482  
    5050    tmp2 = image_dup(tmp1);
    5151    filter_median(tmp2);
    52     filter_equalize(tmp2, 200);
     52    filter_threshold(tmp2, 200);
    5353    count_objects(tmp2);
    5454
  • pwntcha/trunk/src/test.c

    r448 r482  
    3232    filter_smooth(tmp);
    3333    filter_median(tmp);
    34     filter_equalize(tmp, 130);
     34    filter_threshold(tmp, 130);
    3535    filter_median(tmp);
    3636
  • pwntcha/trunk/src/tickets.c

    r481 r482  
    4747    /* captcha is jpeg; threshold the image */
    4848    tmp = image_dup(img);
    49     filter_equalize(tmp, 127);
     49    filter_threshold(tmp, 127);
    5050
    5151    /* Guess all glyphs */
  • pwntcha/trunk/src/vbulletin.c

    r449 r482  
    4343    getpixel(tmp, 0, 0, &r, &g, &b);
    4444    if(r < 50)
    45         filter_equalize(tmp, 128);
     45        filter_threshold(tmp, 128);
    4646    else
    47         filter_equalize(tmp, -128);
     47        filter_threshold(tmp, -128);
    4848
    4949    /* Remove garbage around the cells */
  • pwntcha/trunk/src/xanga.c

    r460 r482  
    3636image_save(tmp, "xanga1.bmp");
    3737    /* Clean image a bit */
    38 //    filter_equalize(tmp, 200);
     38//    filter_threshold(tmp, 200);
    3939    filter_contrast(tmp);
    4040    //filter_detect_lines(tmp);
     
    4848//    filter_median(tmp);
    4949//image_save(tmp, "xanga4.bmp");
    50 //    filter_equalize(tmp, 128);
     50//    filter_threshold(tmp, 128);
    5151    filter_contrast(tmp);
    5252image_save(tmp, "xanga4.bmp");
     
    5555    /* Detect small objects to guess image orientation */
    5656    filter_median(tmp);
    57     filter_equalize(tmp, 200);
     57    filter_threshold(tmp, 200);
    5858
    5959    /* Invert rotation and find glyphs */
Note: See TracChangeset for help on using the changeset viewer.