To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.roboticsOpen lugnet.robotics in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / 19804
19803  |  19805
Subject: 
Re: Working motorized focus for Vision Command
Newsgroups: 
lugnet.robotics
Date: 
Wed, 18 Dec 2002 05:03:09 GMT
Viewed: 
914 times
  
Thanks for replying!

I was thinking of the same procedure. But to help with the varried depth
problem, a small part of the viewed area could be selected to be the
focusing point.

So overall, it must be possible, right?

Timothy

In lugnet.robotics, Steve Baker <sjbaker1@airmail.net> writes:
Bluey wrote:
anyone??



In lugnet.robotics, Timothy Schroeder writes:

This may be a stupid question, but could the vision command be made to
"autofocus" given special code?

Well, I'm not an expert - but I imagine it should be possible to produce
a measure of how sharp the image is. For example by adding up all the
differences between one pixel and it's neighbours.  In a sharp image,
you'd expect a lot of nice high contrast information - which would
result in some big jumps in brightness from one pixel to the next
in some parts of the image.  However, if the image is all blurry,
you'd expect very gentle changes from one pixel to the next.

Once you have a measure of how focussed the image is, you can then
wind the focus dial up and down until you get the sharpest image.

Of course this won't work if you point the camera at something
blurry - or if there is a lot of depth in the scene such that you
can't keep it ALL in focus at one time.

So, I think it's possible - but I bet there are much better ways
to get there than the technique I describe.  You might want to use
the square of the difference in pixel brightnesses for example - or
exclude all pixels with less than a certain threshold from the testing -
or just count the number of pixels with more than such-and-such difference
from their neighbours.

I'm sure you could find some good books on Image processing that would
provide some tried-and-tested algorithms.
---------------------------- Steve Baker -------------------------
HomeEmail: <sjbaker1@airmail.net>    WorkEmail: <sjbaker@link.com>
HomePage : http://web2.airmail.net/sjbaker1
Projects : http://plib.sf.net    http://tuxaqfh.sf.net
           http://tuxkart.sf.net http://prettypoly.sf.net



Message has 1 Reply:
  Re: Working motorized focus for Vision Command
 
(...) Yes - that'll also make the algorithm run faster. (...) I'm sure it's possible. What I'm not sure about is whether the kind of naive algorithm that I could come up with after just a few minutes thought would be effective. It might take some (...) (22 years ago, 18-Dec-02, to lugnet.robotics)

Message is in Reply To:
  Re: Working motorized focus for Vision Command
 
(...) Well, I'm not an expert - but I imagine it should be possible to produce a measure of how sharp the image is. For example by adding up all the differences between one pixel and it's neighbours. In a sharp image, you'd expect a lot of nice high (...) (22 years ago, 18-Dec-02, to lugnet.robotics)

15 Messages in This Thread:





Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR