How to check if an image contains an element I am searchig for

Dan Stromberg drsalists at gmail.com
Wed Jun 16 17:34:08 EDT 2021


On Wed, Jun 16, 2021 at 2:04 PM Barry <barry at barrys-emacs.org> wrote:

> >>> On Thu, Jun 17, 2021 at 6:06 AM Arak Rachael <arakelt... at gmail.com>
> wrote:
> >>>
> >>> Hi guys,
> >>>
> >>> I have an image from google maps to say and I need to check if it has
> road markings, in order to do that, I believe I need to change the effects
> on the image so the markings and road can be white or something and the
> things I don't need like cars, trees and so on to be black.
> >>>
> >>> images should contain only road surface and/or road markings (lines,
> zebras, stripes.
> >>>
> >>> Can anyone help me on this, I already have the crop code, I just need
> to check if the cropped part contains what I need.
> >> How well can you define the things you're looking for?
> >>
> >> https://xkcd.com/1425/
> >>
> >> ChrisA
> > Hi Chris,
> >
> > what do you mean?
>
> He means that image processing is a hard problem that requires expertise
> to solve.
>
> >
> > Here is the image, I need to separate the road and markings from the
> rest and divide the image into squares of 100x100 pixels, for each square I
> need to check if it contains a road and markings:
>
> Can you define road in terms of an algorithm that looks at the pixels?
>

I think that XKCD may be a little out of date.

You could probably train a Deep Learning model to do this, if you have
enough prelabeled data with enough variation.

And of course dividing a picture up into 100x100 squares is pretty easy if
you convert to ppm.  Perhaps Pillow can do this too.

HTH.


More information about the Python-list mailing list