Giter VIP home page Giter VIP logo

cbl-js's People

Contributors

savagecore avatar skotz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cbl-js's Issues

Get captcha to image

Hi it's me again, thanks for your help last time. This time I have a kind of annoying captcha, I tried to do the decoding but still failed. This captcha is not the same as normal, it requires converting letters into numbers. Hope to receive your help!

Here are some examples of this captcha code type

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

Need help to solve captcha with line

Can you please help to solve this kind of Captcha it is 6 numbers with line (Thank you so much for your examples and your efforts)
I just modified the index in the elvincth example as follow :
var cbl = new CBL({
preprocess: function(img) {
img.debugImage("debugPreprocessed");
img.binarize(168);
img.debugImage("debugPreprocessed");
img.convolute([ [1, 0, 1],
[0, 1, 0],
[1, 0, 1] ], 0.44);
img.debugImage("debugPreprocessed");
img.blur();
img.debugImage("debugPreprocessed");
img.binarize(75);
img.debugImage("debugPreprocessed");
img.colorRegions(40, true);
img.debugImage("debugPreprocessed");
},
character_set: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",
blob_min_pixels: 20,
blob_max_pixels: 800,
pattern_width: 40,
pattern_height: 30,
allow_console_log: true,
blob_debug: "debugSegmented"
});
I got this
test1
after
test4-4


test2-2
test3-3


test3
test2-2

test4
test1-1

please help with this - thank you

6
9
10
11

7
8

How I can resolve this captcha?

Hi, I tried to resolve this captcha but without success, I hope someone can help me.
image
image
image
image
image
image

var cbl = new CBL({
            /* Define a method that takes an input CAPTCHA and performs a set of image operations to remove noise. */
            preprocess: function(img) {
                // Each pixel lighter than the grayscale threshold of 220 is turned white and everything darker is turned black.
                img.binarize(220);
                
                
                // Output the work-in-progress image to an element with a specific ID so we can see the effect of our image operations.
                img.debugImage("debugPreprocessed");
                
                // Flood-fill every blob (a grouping of similarly colored pixels) with a unique color. 
                // This is an important last step of the segmentation phase since the segmenter will create a separate character
                // image for each unique color in the image. If all the characters are black then the segmenter will only find one character.
                img.colorRegions(1, true);
                
                // Once again output the image to a div or something so we see the effect of colorization.
                img.debugImage("debugPreprocessed");
            },
            /* The set of characters that could potentially be in this CAPTCHA system. */
            character_set: "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz",
            /* The minimum number of pixels required to call a grouping of similar pixels a blob. Use this to filter out small specks before segmentation. */
            blob_min_pixels: 140,
            /* The maximum number of pixels required to call a grouping of similar pixels a blob. */
            blob_max_pixels: 700,
            /* The width of the extracted blobs. All patterns are normalized to this width. */
            pattern_width: 25,
            /* The height of the extracted blobs. All patterns are normalized to this height. */
            pattern_height: 25,
            /* Enable advanced logging in the browser's console. */
            allow_console_log: true,
            /* Compare the differences between colors using algorithms based on how the human eye perceives color (instead of just an RGB comparison). */
            perceptive_colorspace: true,
            /* The ID of the element to output all work-in-progress images of segmented characters from each image. */
            blob_debug: "debugSegmented"
        });

Fix exact characters to split in three and resize to resulting character

The exact_characters setting will split in half but not into thirds, so this:

658d35

Splits awkwardly down the middle of the 8:

image

The split characters need to be cropped to the resulting character boundaries, not keep the boundaries of the pre-split image. For example:

g2np4n

The p needs some space cropped off the top after the split, and the 4 needs some space cropped off the bottom.

image

See #32

Help with this

d

i use this config:

preprocess: function(img) {
img.opaque();
img.binarize(200);
img.colorRegions(50, true);
},
blob_min_pixels: 50,
blob_max_pixels: 1000,
pattern_width: 50,
pattern_height: 50,
pattern_maintain_ratio: true

Can you help resolve this

Its a five number captcha. this is where I get so far.
var cbl = new CBL({
preprocess: function(img) {
img.debugImage("debugPreprocessed");
img.binarize(32);
img.debugImage("debugPreprocessed");
img.cropRelative(28, 2, 60, 2);
img.debugImage("debugPreprocessed");
img.colorRegions(50, true, 0);
},
character_set: "0123456789abcdefghijklmnopqrstuvwxyz",
exact_characters_width: 50,
exact_characters_play: 2,
exact_characters: 5,
blob_min_pixels: 10,
blob_max_pixels: 10000,
pattern_width: 30,
pattern_height: 30,
allow_console_log: true,
blob_console_debug: true,
blob_debug: "debugSegmented"
});

    cbl.train("./sss/0.png");
    cbl.train("./sss/1.png");
    cbl.train("./sss/2.png");
    cbl.train("./sss/3.png");
    cbl.train("./sss/4.png");
    cbl.train("./sss/5.png");
    cbl.train("./sss/6.png");
    cbl.train("./sss/7.png");
    cbl.train("./sss/8.png");
    cbl.train("./sss/9.png");

0
1
2
3
4
5
6
7
8
9

Tnx a lot

How can i achieve this

how can i solve following captcha? I am new to JS and would really appreciate your help on how to implement in my code?
sample

how to solve this captcha?

hello, i have a harder challange, how would i use the library to presegment and actually solve thiscaptcha?
1nkm4j
3wj671
730cr1

img.debugImage("debugPreprocessed");
img.binarize(190);

problems with new captcha

Hello, I'm trying to solve the captcha:
https://image.ibb.co/ePUrBH/3.jpg

but I'm not getting it, it does not seem to identify all the characters

var cbl = new CBL({
            preprocess: function(img) {
                img.binarize(32);
                img.debugImage("debugPreprocessed");
            },
            character_set: "abcdefghijklmnopqrstuvwxyz0123456789",
            model_file: "cryptographp-model.txt",
            blob_min_pixels: 40,
            blob_max_pixels: 350,
            pattern_width: 24,
            pattern_height: 24,
            pattern_maintain_ratio: true,
            allow_console_log: true,
            perceptive_colorspace: true,
            blob_debug: "debugSegmented",
            model_loaded: function() {
                document.getElementById("aSolve").style.display = "inline-block";
            }
        });

cbl.train("image.jpg");

After using the filter apparently the captcha is well cleaned, what am I doing wrong?
https://image.ibb.co/jztCJx/ccc.png
๐Ÿ˜„

Generate the model of the hash

hello, how can I generate the model of the hash to solve my captcha?
because of what I understand the .txt file has a hash that when loaded by the project understands * what each letter is. but my captcha is different and I need to train it and generate this new hash, but I do not know how to generate this hash

How to improve this code?

Hallo, I tried to implement cbl-js for the following images:
0 1
2 3
4 5
6 7
8 9
10 11
I implemented the code below:

var cbl = new CBL(
{
	preprocess: function(img)
	{
		img.binarize(190);
		img.blur();
		img.binarize(32);
		img.colorRegions(50,true,0);
	},
	character_set: "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",
	blob_min_pixels: 50,
	blob_max_pixels: 400,
	pattern_width: 25,
	pattern_height: 25,
	perceptive_colorspace: true,
});

Any idea how to improve it?

using cbl with nodejs

hello,
I'm trying to adapt cbl.js to work on nodejs, but I'm having a problem.

cbl does a getElementById () to get the image, but I currently have this image saved in a /src directory and as I run with the nodejs I do not have the DOM (I can try to use a package for virtual DOM, but I think it can not be best choice).

any tips?

Can you help resolve this

Can you help resolve this
1
2
train
1

    var cbl = new CBL({
        /* Define a method that takes an input CAPTCHA and performs a set of image operations to remove noise. */
        preprocess: function(img) {
            img.debugImage("debugPreprocessed");
            img.removeGray(10);
            img.debugImage("debugPreprocessed");
            img.blur();
            img.debugImage("debugPreprocessed");
            img.convolute([ [1, 0, 1],
                            [0, 1, 0],
                            [1, 0, 1] ], 1/3);
            img.debugImage("debugPreprocessed");
            img.blur();
            img.debugImage("debugPreprocessed");
            img.binarize(190);
            img.debugImage("debugPreprocessed");
            img.colorRegions(40, true);
            img.debugImage("debugPreprocessed");
        },
        character_set: "0123456789",
        blob_min_pixels: 50,
        blob_max_pixels: 500,
        pattern_width: 20,
        pattern_height: 20,
        allow_console_log: true,
        blob_debug: "debugSegmented"
    });

Any way with this one?

Hello! I'm trying to solve following Captcha.

1
2
3
4
5

I found out, that following settings are the best, but may be you have any suggestion how to improve the result?

                img.convolute([[0, -1, 0], [-1, 4.9, -1], [0, -1, 0]]);
                img.debugImage("debugPreprocessed");

                img.binarize(120);
                img.debugImage("debugPreprocessed");
                
                img.blur(1);
                img.debugImage("debugPreprocessed");

                img.binarize(120);
                img.debugImage("debugPreprocessed");

                img.colorRegions(50);
                img.debugImage("debugPreprocessed");

Thanks for this library! :D

What is the blob size of this image?

img.binarize(220);

blob_min_pixels: 50, blob_max_pixels: 500, pattern_width: 20, pattern_height: 20,

I tried this one but when it go to segmented the size of each number is wrong .

How to solve this captcha

Not an issue, but am not getting the trainer to solve this.

captchaToSolve2

I Tried all the examples provided in the projects folder but non worked.
Could you help please?

How to use?

Hey,

Is this project still alive? If yes how this is supposed to be used?

Use image file instead of img html node?

Is there a way I can just have this solve a captcha from the downloaded image instead of through an img element? I'm doing some cross domain stuff, and I want to avoid opening an iframe as it slows things down.

Solving when two characters touch

I'm trying to train this thing to solve an easy captcha, but getting stuck a little. If the captcha has two characters that are touching then there's no combination I can try to get it to pick up both characters.

Do you know how this could be done? Maybe I'm missing a setting that should be changed? Some examples are attached.

The first one won't recognize the 5 and a, second one won't recognize the m and the d, and third one won't recognize the p or the 4.

8
3
4

Help to solve this captcha.

Hi, I am trying to recognize this captcha. and came across a problem.
captcha :
img1
img2
img3
img4
img5
When run train.html,

       var cbl = new CBL({
          preprocess: function(img) {
            img.binarize(32);
            img.debugImage("debugPreprocessed");
            img.blur(1);
            img.debugImage("debugPreprocessed");
            img.binarize(255);
            img.debugImage("debugPreprocessed");
            img.colorRegions(40, true);
            img.debugImage("debugPreprocessed");
        },
        character_set: "0123456789",
        model_file: "model.txt",
        blob_min_pixels: 40,
        blob_max_pixels: 350,
        pattern_width: 24,
        pattern_height: 24,
        pattern_maintain_ratio: true,
        allow_console_log: true,
        perceptive_colorspace: true,
        blob_debug: "debugSegmented"
    });

The result of 16 sample training is :
train

Then, update model.txt and solve.html file, it can't fully identify the captcha.
Target captcha:
img6
Result:
solve

    var cbl = new CBL({
        preprocess: function(img) {
            img.binarize(100);
            img.blur(1);
            img.binarize(220);
            img.colorRegions(40);
        },
        /* Load the model we saved during training. */
        model_file: "model.txt",
        character_set: "0123456789",
        blob_min_pixels: 40,
        blob_max_pixels: 350,
        pattern_width: 24,
        pattern_height: 24,
        perceptive_colorspace: true,
        /* Define a method that fires immediately after successfully loading a saved model. */
        model_loaded: function() {
            // Don't enable the solve button until the model is loaded.
            document.getElementById('solve').style.display = "block";
        }
    });   

Is it because of Not enough sample training or other else's ?Could you help me to fix it? Thanks!

How to solve this captcha?

D9QQ8U
H6E7V2
6HYFHM
76US7T

I tried with this

var cbl = new CBL({
            preprocess: function(img) {
                img.binarize(150);
                img.debugImage("debugPreprocessed");
                img.blur();
                img.debugImage("debugPreprocessed");
				img.binarize(50);
				img.debugImage("debugPreprocessed");
                img.colorRegions(50,true, 1);
                img.debugImage("debugPreprocessed");
            },
            /* The set of characters that could potentially be in this CAPTCHA system. */
            character_set: "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",
            /* The minimum number of pixels required to call a grouping of similar pixels a blob. Use this to filter out small specks before segmentation. */
            blob_min_pixels: 100,
            /* The maximum number of pixels required to call a grouping of similar pixels a blob. */
            blob_max_pixels: 400,
            /* The width of the extracted blobs. All patterns are normalized to this width. */
            pattern_width: 25,
            /* The height of the extracted blobs. All patterns are normalized to this height. */
            pattern_height: 25,
            /* Enable advanced logging in the browser's console. */
            allow_console_log: true,
            /* Compare the differences between colors using algorithms based on how the human eye perceives color (instead of just an RGB comparison). */
            perceptive_colorspace: true,
            /* The ID of the element to output all work-in-progress images of segmented characters from each image. */
            blob_debug: "debugSegmented"
        });

Custom captcha

Hey. I'm trying to fiddle around with your captcha solver.

I tried to add this image for the program to solve:

https://imgur.com/QNJrBzP

without any luck. Do i need to strip down each character and store it as a master image, or how do i go about doing this?

How about this one?

hello, i have a harder challange, how would i use the library to presegment and actually solve this single character captcha?

It is a single number from 1-9

I have a working method but i'd like to do with this method just for curiosity of how to get it working with javascript.

verimage-477749927
verimage-905817473
verimage-427168729

Those images are just a small portion of the big dataset as an example. How would i get rid of the trashy background ?

Thanks in the future

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.