Преглед на файлове

* filter_equalize -> filter_threshold

git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/pwntcha/trunk@482 92316355-f0b4-4df1-b90c-862c8a59935f
master
sam преди 19 години
родител
ревизия
c97e07681f
променени са 12 файла, в които са добавени 16 реда и са изтрити 16 реда
  1. +2
    -2
      src/authimage.c
  2. +1
    -1
      src/clubic.c
  3. +1
    -1
      src/common.h
  4. +1
    -1
      src/filter.c
  5. +1
    -1
      src/linuxfr.c
  6. +1
    -1
      src/livejournal.c
  7. +1
    -1
      src/phpbb.c
  8. +1
    -1
      src/slashdot.c
  9. +1
    -1
      src/test.c
  10. +1
    -1
      src/tickets.c
  11. +2
    -2
      src/vbulletin.c
  12. +3
    -3
      src/xanga.c

+ 2
- 2
src/authimage.c Целия файл

@@ -42,9 +42,9 @@ char *decode_authimage(struct image *img)
tmp = image_dup(img);
filter_scale(tmp, 2.0);
getpixel(tmp, 0, 0, &r, &g, &b);
filter_equalize(tmp, r * 3 / 4);
filter_threshold(tmp, r * 3 / 4);
filter_smooth(tmp);
filter_equalize(tmp, 220);
filter_threshold(tmp, 220);

for(i = 0; i < 6; i++)
{


+ 1
- 1
src/clubic.c Целия файл

@@ -32,7 +32,7 @@ char *decode_clubic(struct image *img)
strcpy(result, " ");

tmp = image_dup(img);
filter_equalize(tmp, 200);
filter_threshold(tmp, 200);
find_glyphs(tmp);

image_free(tmp);


+ 1
- 1
src/common.h Целия файл

@@ -72,7 +72,7 @@ void filter_fill_holes(struct image *img);
void filter_scale(struct image *img, float ratio);
void filter_black_stuff(struct image *img);
void filter_detect_lines(struct image *img);
void filter_equalize(struct image *img, int threshold);
void filter_threshold(struct image *img, int threshold);
void filter_trick(struct image *img);
void filter_smooth(struct image *img);
void filter_median(struct image *img);


+ 1
- 1
src/filter.c Целия файл

@@ -201,7 +201,7 @@ void filter_detect_lines(struct image *img)
image_free(dst);
}

void filter_equalize(struct image *img, int threshold)
void filter_threshold(struct image *img, int threshold)
{
struct image *dst;
int x, y;


+ 1
- 1
src/linuxfr.c Целия файл

@@ -43,7 +43,7 @@ char *decode_linuxfr(struct image *img)
stats = malloc(img->height * sizeof(int));

tmp = image_dup(img);
filter_equalize(tmp, 150);
filter_threshold(tmp, 150);

for(y = 0; y < tmp->height; y++)
{


+ 1
- 1
src/livejournal.c Целия файл

@@ -37,7 +37,7 @@ char *decode_livejournal(struct image *img)
filter_median(tmp);
// filter_smooth(tmp);
// filter_contrast(tmp);
filter_equalize(tmp, 128);
filter_threshold(tmp, 128);
image_save(tmp, "foo.bmp");
find_glyphs(tmp);



+ 1
- 1
src/phpbb.c Целия файл

@@ -44,7 +44,7 @@ char *decode_phpbb(struct image *img)
tmp2 = image_new(img->width, img->height);

filter_smooth(tmp1);
filter_equalize(tmp1, 128);
filter_threshold(tmp1, 128);

for(x = 0; x < img->width; x++)
for(y = 0; y < img->height; y++)


+ 1
- 1
src/slashdot.c Целия файл

@@ -49,7 +49,7 @@ char *decode_slashdot(struct image *img)
/* Detect small objects to guess image orientation */
tmp2 = image_dup(tmp1);
filter_median(tmp2);
filter_equalize(tmp2, 200);
filter_threshold(tmp2, 200);
count_objects(tmp2);

/* Invert rotation and find glyphs */


+ 1
- 1
src/test.c Целия файл

@@ -31,7 +31,7 @@ char *decode_test(struct image *img)
tmp = image_dup(img);
filter_smooth(tmp);
filter_median(tmp);
filter_equalize(tmp, 130);
filter_threshold(tmp, 130);
filter_median(tmp);

image_free(tmp);


+ 1
- 1
src/tickets.c Целия файл

@@ -46,7 +46,7 @@ char *decode_tickets(struct image *img)

/* captcha is jpeg; threshold the image */
tmp = image_dup(img);
filter_equalize(tmp, 127);
filter_threshold(tmp, 127);

/* Guess all glyphs */
curx = 50;


+ 2
- 2
src/vbulletin.c Целия файл

@@ -42,9 +42,9 @@ char *decode_vbulletin(struct image *img)
tmp = image_dup(img);
getpixel(tmp, 0, 0, &r, &g, &b);
if(r < 50)
filter_equalize(tmp, 128);
filter_threshold(tmp, 128);
else
filter_equalize(tmp, -128);
filter_threshold(tmp, -128);

/* Remove garbage around the cells */
for(x = 0; x < tmp->width; x++)


+ 3
- 3
src/xanga.c Целия файл

@@ -35,7 +35,7 @@ char *decode_xanga(struct image *img)
tmp = image_dup(img);
image_save(tmp, "xanga1.bmp");
/* Clean image a bit */
// filter_equalize(tmp, 200);
// filter_threshold(tmp, 200);
filter_contrast(tmp);
//filter_detect_lines(tmp);
image_save(tmp, "xanga2.bmp");
@@ -47,14 +47,14 @@ image_save(tmp, "xanga3.bmp");
//filter_detect_lines(tmp);
// filter_median(tmp);
//image_save(tmp, "xanga4.bmp");
// filter_equalize(tmp, 128);
// filter_threshold(tmp, 128);
filter_contrast(tmp);
image_save(tmp, "xanga4.bmp");

#if 0
/* Detect small objects to guess image orientation */
filter_median(tmp);
filter_equalize(tmp, 200);
filter_threshold(tmp, 200);

/* Invert rotation and find glyphs */
filter_median(tmp);


Зареждане…
Отказ
Запис