Search found 28 matches

by cso
2017-10-02T18:54:58-07:00
Forum: Users
Topic: checkbox detection
Replies: 28
Views: 16396

Re: checkbox detection

Ok maybe cropping the individual boxes is not a good idea after all.
To reset the problem, this is my larger image and I want to classify all boxes in this image as ticked or non-ticked.

Image

Fred, what would you use?
by cso
2017-10-02T17:27:28-07:00
Forum: Users
Topic: checkbox detection
Replies: 28
Views: 16396

Re: checkbox detection

@Fred: I tried, it doesn't work well. I read your solution in this thread: https://www.imagemagick.org/discourse-server/viewtopic.php?t=31295 I have to hand-tune the threshold to make it work. I also read this, maybe I should use morphology? http://www.imagemagick.org/Usage/compare/#sub-image Looks ...
by cso
2017-09-29T11:59:44-07:00
Forum: Users
Topic: checkbox detection
Replies: 28
Views: 16396

Re: checkbox detection

I'm not trying to find the location of the boxes. I already know the location of the boxes (sometimes there is a small deviation of some pixels which is the X/Y shift you see in the group of the 4 images) and crop them up in individual images. What I want to know is whether the cropped image of the ...
by cso
2017-09-29T11:52:19-07:00
Forum: Users
Topic: checkbox detection
Replies: 28
Views: 16396

Re: checkbox detection

Sorry, edited the post, you're too fast (thanks!) and I was sloppy! I don't have fully black squares anymore, I only ticked check boxes and non ticked ones (empty).
by cso
2017-09-29T11:39:37-07:00
Forum: Users
Topic: checkbox detection
Replies: 28
Views: 16396

Re: checkbox detection

I want to match this image Image in one of these 4 boxes:

Image
Image
Image
Image
by cso
2017-09-29T10:24:09-07:00
Forum: Users
Topic: checkbox detection
Replies: 28
Views: 16396

Re: checkbox detection

I already crop separate images of each checkbox. Here are some examples: https://i.imgur.com/MFpQLuj.png https://i.imgur.com/k8cmiUZ.png https://i.imgur.com/XuaS5xa.png https://i.imgur.com/qTTGiTP.png Do you think subimage search would work better/faster than the "counting black pixels on every...
by cso
2017-09-29T09:44:02-07:00
Forum: Users
Topic: checkbox detection
Replies: 28
Views: 16396

Re: checkbox detection

@Fred: Wouldn't that be slower?

edit: also less reliable because of the X, Y shift.
by cso
2017-09-29T09:43:00-07:00
Forum: Users
Topic: checkbox detection
Replies: 28
Views: 16396

Re: checkbox detection

I mean count (or calculate the sum of) the black black pixels on each Y.
That way it will be something like:

Code: Select all

 0%
90%    +--------+
 2%    |        |
 2%    |        |
 2%    |        |
 2%    |        |
90%    +--------+
 0%


 
by cso
2017-09-29T09:07:53-07:00
Forum: Users
Topic: checkbox detection
Replies: 28
Views: 16396

Re: checkbox detection

Tried it and while it seems to work ok most of the time, sometimes there is a small shift (translation i X or Y) in the crop of the checkbox which is problematic for accuracy. The "[peak black pixel sum] ... [low black pixel sum] ... [peak black pixel sum]" would be better I think. Don't k...
by cso
2017-09-28T08:09:07-07:00
Forum: Users
Topic: checkbox detection
Replies: 28
Views: 16396

Re: checkbox detection

I know where it is but not exact to the pixel level. There might be some x, y translation.
How do I find the mean lightness?
by cso
2017-09-28T06:06:59-07:00
Forum: Users
Topic: checkbox detection
Replies: 28
Views: 16396

Re: checkbox detection

I had an idea, check it with histogram distribution? The checkbox with a check won't have 2 sudden drops in the histogram. I mean: - the edges of the rectangle have "max black pixels" - the "inside" of the checked rectangle has "less than max black pixels" - the "i...
by cso
2017-09-22T11:42:43-07:00
Forum: Users
Topic: checkbox detection
Replies: 28
Views: 16396

Re: checkbox detection

Yeah, I was just wondering if this alternative approach is possible.
by cso
2017-09-21T16:10:43-07:00
Forum: Users
Topic: checkbox detection
Replies: 28
Views: 16396

Re: checkbox detection

Any ideas?
by cso
2017-09-18T15:42:39-07:00
Forum: Users
Topic: checkbox detection
Replies: 28
Views: 16396

Re: checkbox detection

Thanks for the replies!

I was also thinking, how can detect an actual rectangle? Like 4 edges and only white pixels "inside"?
by cso
2017-08-02T23:30:43-07:00
Forum: Users
Topic: checkbox detection
Replies: 28
Views: 16396

checkbox detection

How can I detect if the checkbox in an image is checked or not?

Example with checkbox checked:
http://imgur.com/a/3VPuC

Example with checkbox not checked:
http://imgur.com/DwQvB4X

Note: I'm not embedding the images because the one with the checkbox checked appears weird.