Z
Z
ZooX2015-11-20 20:34:36
PHP
ZooX, 2015-11-20 20:34:36

How to determine the number of objects in an image?

Is there an image captcha.php
, is it possible to determine the number of objects on it using js or php? If yes, then I ask you to push in the right direction, I do not ask you to decide for me.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
I
Inwork277, 2015-11-20
@Inwork277

Strictly IMHO. I have never been interested in this, but I will express my idea.
In a specific case, you can go from left to right, read the columns and count the number of non-green segments, memorize, look at the next one and compare so that for each segment from the previous column there is at least one non-green pixel in the same range along the Y axis. If in some point was not found, then count ++, otherwise we remember the new segments and go to the next column.
ps left-to-right or top-to-bottom without a difference on idea. This Frankenstein will work both ways.

C
ChymeNik, 2015-11-20
@ChymeNik

If it is assumed that the objects are of the same shape and size, sum the colors (or otherwise) in the 1st object, sum all the colors except for the green of the whole picture and compare

D
Denis, 2015-11-20
@prototype_denis

opencv. There are also for puff, and for the node, and for other languages.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question