POV-Ray : Newsgroups : povray.off-topic : simple image recognition : Re: simple image recognition Server Time
1 Oct 2024 09:25:46 EDT (-0400)
  Re: simple image recognition  
From: Kevin Wampler
Date: 31 Mar 2008 23:41:57
Message: <47f1bd15@news.povray.org>
I'm a bit out of my depth here, but I might be able to give a bit of 
useful info nonetheless.  Firstly, I'd suggest that if you don't have 
some experience in computer vision already (I have no idea weather or 
not this is the case) then you hire someone who does, since vision-type 
algorithms are very easy to get very wrong unless you're implementing 
something which is already known to work.

As for some possible approaches that you might use to solve this, you 
might look at the work which had been done in image segmentation, and 
more directly relevant to your problem image matting and image colorization.

The most common approaches that I've seen in image matting and 
colorization tend to be based around defining a error measure between 
pixels defining how likely they are to be in the same region (or be the 
same color) and then based on a few marks from a user determine the 
lowest-error global matting / colorization for the entire image.  The 
min-cut algorithm is well suited to this sort of problem, but others 
have been used as well.

The problem that these methods might have in your case is that they 
generally rely on building a color model to define a region (so they 
won't work well when the region colors are very similar) or use image 
gradients to define the error metric (in which case shadows might cause 
problems).

Despite its possible drawbacks for this application, I'd say that 
looking at a gradient-based error metric is a good place to start. 
Fortunately, there's already a paper on this with respect to image 
colorization which has some Matlab code available for you to play around 
with:

http://www.cs.huji.ac.il/~yweiss/Colorization/

Your problem isn't strictly colorization, but it's closely related so 
this may well be useful.

The SIOX algorithm mentioned by Jim is a feature in GIMP version 2.4, so 
you can try it out there, but I suspect that it won't work too well for 
many of your images (just a hunch though, I could easily be wrong).

Scott's suggestion of using object recognition techniques is pretty 
reasonable, particularly since you only want this to work for a very 
constrained set of images.  The disadvantage of this is that you'll 
probably need a large set of labeled images to train a classifier on, 
but I'd be surprised if such data isn't available somewhere, and you 
could always bite the bullet and label a bunch of images yourself.  If 
you do go this route, I'd guess that you'd want to use the object 
recognition to augment a matting/colorization style algorithm so that 
it's easy for the user to correct any mistakes that the algorithm makes.

Overall, my biggest high-level suggestion would be to use an algorithm 
that runs quickly enough for a user to iteratively correct any mistakes 
that it makes, since it's not always easy to tell in advance where and 
how they will fail.  Also, I haven't done any actual programming in this 
area, so take all my advice with the appropriate grain of salt.  Good luck!


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.