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

Cameron Simpson cs at cskk.id.au
Wed Jun 16 20:49:36 EDT 2021


On 16Jun2021 15:51, Arak Rachael <arakelthedragon at gmail.com> wrote:
>I understand your concerns. Actually I am doing image processing of 
>satellite pictures for smart cars. I have been given the option to use 
>InfranView and do it manually or create a Python script.

If you need to slice images into 100x100 pixels squares, the Pillow 
module should make that easy. Just looking at InfranView here: 
https://www.irfanview.com/main_what_is_engl.htm I imagine it can do the 
same - there's some reference to a batch mode but I have no idea what it 
can do.  Or a shell script using GraphicswMagick or ImageMagick.

The hard part is the image classification: does this imagine contain a 
pedestrian crossing, etc etc etc? Unless InfranView has some outstanding 
image processing plugin with access to a precatalogued corpus of images 
I'd be surprised if it will help.

This doesn't solve your problem, but it feels like you think there are 
easy ways to look at a small chunk of an image and analyse its content 
for high level features. Smart cars need that for hazard recognition etc 
if they use cameras (eg Teslas, which I believe want to eschew LIDAR for 
cameras).

What little I know of the field says that these things are not easily 
done.  Camera data are full of noise, not geommetricaly aligned with 
what you're looking for (stripes and various angles, for example), will 
only have a portion of the feature in view (particularly after cropping 
into little squares), varying lighting, varying feature colours, people 
wearing stripey shirts.

So an AI approach relies not on semantic knowledge of how things are 
constructed (rectangular stripes of paint on a raod surface or whatever) 
but on training a neural net style learner to correlate image measures 
with categories, in the hope that those measures (and their 
combinations/correlations) will recognise other objects in the same 
categories correctly after being fed sufficient images (all correctly 
precategorised of course).

Can you outline how you'd like the Python side to work? It sounds likee 
you have a batch of images to:
- crop into tiles of a particular size (maybe to constraint the compute 
  used per tile)
- recognise features in each tile

The first part is easily done in Python. The second part is _hard_.

Cheers,
Cameron Simpson <cs at cskk.id.au>


More information about the Python-list mailing list