1. This forum section is a read-only archive which contains old newsgroup posts. If you wish to post a query, please do so in one of our main forum sections (here). This way you will get a faster, better response from the members on Motherboard Point.

Laser target shooting (finding laser spot location)

Discussion in 'Embedded' started by Favne Reas, Sep 10, 2005.

  1. Favne Reas

    Favne Reas Guest

    Hello Everybody,

    I want to get expert opinions about how we can find/measure the position of
    a few millisecond long laser spot on an A4 size of target area.

    Although my application notting to do with shooting, using the "laser target
    shooting" analogy will help. In these days we can buy small red laser diodes
    just for few dolars. Assume we have one of them. The Laser diode will be
    connected to a microcontroller which will trigger (turn on and off for few
    millisecond) the diode. (If required, I think we can also modulate the laser
    diode for few KHz ).

    We will point this laser and trigger to a target area of approximatelly
    20x30 cm in size and at a distance of 25-50meters. Now the question; on the
    target, how we can find the position of this laser spot?

    I know there are some laser shooting targets which practically doing this.
    How they work?


    Favne Reas
    Favne Reas, Sep 10, 2005
    1. Advertisements

  2. Favne Reas

    JGCASEY Guest

    JGCASEY, Sep 10, 2005
    1. Advertisements

  3. How accurate do you need this position ? What sort of precision do you
    need ? Must the target be portable ? At one end of the spectrum you
    need lots of sensors in a grid, which can be read. On the other end of
    the spectrum, you can use optics + mechanics to direct the beam into a
    sensor. Based on time, and the mechanical position you can determine

    Anton Erasmus
    Anton Erasmus, Sep 10, 2005
  4. Favne Reas

    Favne Reas Guest

    Thank you for the link. I liked their "Laser Target Finder Sensor". The
    content of this link is fantastic. It explains their system in very good
    details. Also the small movie file demonstrates its use.

    But, my application is slightly different. I need to know the location of
    the laser beam pulse on the target with 5-10mm accuracy. As one suggested
    may be a high speed camera would be usefull. But if we try to identify only
    the coded/modulated laser rather than any red light, than I tink we need to
    have something else or something additional to high speed camera.

    Any suggestion?
    Favne Reas, Sep 10, 2005
  5. 1. Turn the laser on.

    2. Capture a frame from the camera, call this image A.

    3. Turn the laser off.

    4. Capture a frame from the camera, call this image B.

    5. C = A - B (pixel by pixel difference)

    6. Apply a little fuzzy matching to identify the red spot in C.

    Essentially, what I'm suggesting is to forget about modulating or
    coding the laser signal, except to the extent that turning it on and
    off in sync with the frame rate of the camera can be considered
    modulation. Step (6) is where the magic is, but if your camera is
    decent and the elapsed time between (2) and (4) is minimal, it should
    be pretty easy. If you put a filter on the camera that's matched to
    the wavelength of your laser, you're almost certain to get it right in
    the absence of malicious attempts to fool the sensor. You won't be
    able to have multiple sensors operating at the same time with the same
    field of view, unless they are tightly coordinated or use different
    Randall Nortman, Sep 10, 2005
  6. In fact the exact 'inverse' of this approach, was what was used for the
    early raster scan display 'light pen' systems, where a bright spot was
    scanned across the display, and when the pen 'saw' the spot, the X,Y
    coordinates where the detector in the pen was pointed could be estimated.
    The approach outlined, lends itself to simply synchronising the laser to
    the frame sync pulse, activating the laser on alternate frames. Then the
    point with the largest change between alternate frames, is the image of
    the point where the beam is pointing. The faster the camera sync rate, the
    faster the detection can be, and the better the rejection of other
    sources. At the 'crude' end of the design, you could even ignore
    complexities in matching, and do a direct frame to frame compare.

    Best Wishes
    Roger Hamlett, Sep 10, 2005
  7. Favne Reas

    AES Guest

    Using a filter will be a key element here. A filter having only a
    narrow (10 A to 50 A) bandpass at the laser wavelength will make the
    camera think it's the dead of night, except for the laser spot. At a
    guess, you might get one of these for $50 new -- or maybe Sam will have
    leads to surplus sources.
    AES, Sep 10, 2005
  8. Favne Reas

    Michael Guest

    for a simple machine vision solution using an NTSC camera with appropriate
    supporting hardware and software and lensing, you should be able to reliably
    detect the pointer to within ~1/2 pixel
    assuming that you digitize your frame at 640x480 pixels, and align it so
    that the sensor is in the same orientation as the target, that should allow
    you to achieve spatial resolution on the order of 30cm*1/(640*2)= ~.25mm.
    Higher resolution cameras would allow for better spatial resolution

    This assumes that your laser is bright enough to be noticable at 30
    frames/sec--you may find that you need to go to a faster camera to detect a
    short, weak pulse. Also, cameras do not acquire images continuously--for an
    exposure on the order of a couple milliseconds, you may need two "out of
    sync" cameras set up so that on is collecting an image while the other is in
    its blank phase.... If you can increase the laser pulse time to something
    greater that a full camera frame cycle, things get much easier....
    Michael, Sep 10, 2005
  9. Favne Reas

    Louis Boyd Guest

    With a webcam, (or video camera + frame grabber) a cheap spotting scope
    or telephoto lens, and a pc you can resolve the position of a light
    flash on a screen to a resolution of about 1 part in 500 of the
    dimensions of the screen in both axis. The target can be any difuse
    reflective surface like a sheet of paper or even a completly random
    background. I've written software which can measure the positon of a
    spot on a video image to better than one pixel using centroiding but for
    a different application and not available for distribution. Still, it's
    within the capability of any decent programmer. Cost for all the
    hardware except a typical P4 PC should be under $300. Higher resolution
    and faster camers are available with digital interfaces but cost more.

    You can download source code for the program "gspy" from
    http://gspy.sourceforge.net which runs under Linux.
    While it is intended as a securiity camera program it has all the
    routines to grab and analyze video images and to locate groups of
    adjacent pixels which change. It's close to what's needed for the above
    Louis Boyd, Sep 10, 2005
  10. Good explanation, but I think he needs a coordinate, not just being
    able to identify the point in the frame.

    This might involve recognizing some fiducial marks. In the absense of
    marks, this problem may be unsolvable.

    If an absolute vector is acceptable, the high res rotary encoders measuring
    elevation and azimuth may be OK. This is getting expensive.

    There is a company in Austin that makes 3d digitizers using this method. I
    think they use time of flight to get the distance, which makes this even
    more exotic (=expensive).
    Bryan Hackney, Sep 10, 2005
  11. On Sun, 11 Sep 2005 00:05:49 +1000, in article
    Well whatever you use is going to need some form of optics in front, so
    is this going to be a fixed distance or any distance position finding?

    Look at Hamamatsu Position Sensitive Detectors, that give an XY on a
    sensor that is focused as required. Primarily meant for cameras and
    industrial applications.


    They have various application notes, which are quite detailed, I was
    looking at for one application.

    A google search on "Hamamatsu PSD" will give various other references
    including a Circuit Cellar project for laser level using a 1D sensor.
    You obviously need a 2D sensor from their range.
    Paul Carpenter, Sep 10, 2005
  12. Favne Reas

    JGCASEY Guest

    Can you be more specific about your actual application?
    Could the target for example be a television screen?
    If a television screen you could use the method that
    shoot em up games use to determine what part of the
    screen the "gun" is pointed.
    JGCASEY, Sep 11, 2005
  13. On Sunday, in article <>
    As this is an international group, the above is true for NTSC and VGA
    resolution cameras. Many other resolutions exist including lots of
    low end 'security', webcam, mobile phone cameras of lower resolution,
    some of which you will be lucky to see more than 500 discrete pixels
    in a line and may well give a cropped image.
    Hmm depends if you want a 'spot is about here' or want to measure to better
    repeatable accuracy, as most measuring algorithms rely on at least 5 pixels
    per edge to avoid aliasing issues. Other methods rely on multiple frame
    averaging (of the images or data from images) to avoid fluctuations in light
    and camera noise affecting the 'edges'. Also the spot size on target will
    change at changing distances, this problem is something dealt with by laser
    theodolites and range finders. See also laser spot targets used on firearms
    and pointers the size of the spot is larger than the sending aperture.
    That assumes the target can be illuminated to a controlled level. I have
    seen many targets indoors that have been messed up by time of day, even
    the humble IR sensing of a mouse that at certain times of day and users with
    small hands as the sun comes in from different windows. If this is external
    all sorts of things can confuse the equipment, traverse of sun, birds and
    other objects in line of sight (even temporarily). I have seen video
    measurements messed up due to wind moving trees causing varying shadow over
    an object, hence giving relatively large levels of light fluctation in
    the camera.
    That really depends on the output level of the laser and spot size at the
    distance relative to ambient CONDITIONS. At the distance stated in the first
    post external conditions do come into play, especially what to do if no
    spot found (if taking one frame and the whole image is one large spot).

    I am reminded of the professor at a local university who went to run a
    local half-marathon with a 'follow-me' robot, that basically followed a
    pulsing IR light source. As soon as the course direction changed to a
    more southerly direction, the robot wandered off following the sun!

    Light only travels very long distances in a vacuum.

    Paul Carpenter, Sep 11, 2005
  14. Favne Reas

    Bob May Guest

    THe typical TV camera has about 600 pixels per line and there are 480 lines.
    With a target area of 300x400mm this means that you'll easily be able to get
    1mm accuracy in the point which is much better than the 10mm that you need.
    Illuminate the target to get about 10% gray and the spot will probalby
    saturate the camera which means that you just need to know where the more
    than 50% illumination is and the 10% will give the outline of the target.
    If you're running a CCD or CMOS accay and are able to access the imageer
    direct, I've got a simple program in QuickBasic on my website
    http://bobmay.astronomy.net/misc/software.htm that will show you where to go
    with the software. The program is GUIDE and it uses an early B&W webcam
    that the commands are available for to do the imaging. For additional help,
    there is another astro camera that used the parallel port to directly acces
    the imager chip called the Cookbook Camera for how the circuits in the
    camera work for such an application.
    Today, if I was to do a job like yours, I'd probably do a PIC processor type
    processor and drive the imageer chip from that.
    Bob May, Sep 11, 2005
  15. [snip]

    I can attest that finding centroids of edge-enhanced,
    frame-differenced images can locate spots of interest
    in extremely noisy images.
    Everett M. Greene, Sep 11, 2005
  16. Favne Reas

    Bob May Guest

    Hmm depends if you want a 'spot is about here' or want to measure to better
    repeatable accuracy, as most measuring algorithms rely on at least 5 pixels
    per edge to avoid aliasing issuesTHe guy was going to be happy with 10mm accuracy. Nearly filling the image
    with the target will give near the accuracy of the full image size. Even at
    a 400x400 pixel size, it is merely a little math to get to find out where
    the spot is iwth greater accuracy than is needed. In addition, doing a
    subtraction of the unlit image with the lit image will subtract out all of
    the background quite nicely and even a simple centroidin of the spot will be
    better than is needed.
    The program on my website has all of the math needed to find out where the
    spot is - after all, the program is designed to track a star for autoguiding
    a telescope for photographing the star field of interest. It downloads an
    image from the camera and detects where the star is in the field and
    provides an error correction to put the scope back to where it is supposed
    to be. Much of that logic isn't needed (the tracking part) but the finding
    of the star in the image part will do a vey nice job for him.
    Target illumination is more that of makign sure that the background around
    the target is not going to be brighter than the target and the illumination
    level is intended to find the position of the target in the image. This is
    an optional item tho as just knowing where the camera is pointed will be
    sufficient probably for the original poaster.
    These are all minor problems that can easily be solved by intelligent use of
    the camera and laser pointer. Get a positive attitude and all problems can
    be solved.
    Bob May, Sep 12, 2005
  17. On Monday, in article <>
    "Bob May" wrote:

    Please leave attributions in.
    That all depends on circumstances, I have seen many a 'simple subtraction of
    xx image' screwed up by beat frequencies of lighting.

    Star tracking has different issues to daylight image processing, internal
    or external.
    At all times the illumination has to be constant to be effective, otherwise
    the background subtraction FAILS. At the original distance of 25-50m that
    is not always guaranteed.
    MINOR problems, in over 20 years of dealing with image processing in lots
    of market places (industrial, medical, security, leisure and others). the
    most common problems are illumination, lenses, and wrong sensor (type or
    use of it). These are the most overlooked aspects. Forgetting the classic
    ones like "why can't I stream high resolution images as raw data to a
    USB 1 hard drive".
    Helps if you know BEFORE hand what problems you are trying to solve and
    what is going to bite you. Too many people think imaging is simple
    and attempt applications that are way beyond the simple kit they think
    will do anything.

    For many reasons including avoiding the worst winds.
    Paul Carpenter, Sep 12, 2005
  18. Then I suggest you reread the thread for a different possible solution
    to investigate I did indeed propose. Which may or may not be practical
    without knowing more about the application.

    Paul Carpenter, Sep 14, 2005
  19. Favne Reas

    Bob May Guest

    Yppe, the illumination of the target is indeed important. I did assume that
    if the guy saw such a problem, he'd solve it in the proper fashion.
    I'm not here to provide the problems but rather answer his question and as
    such, all I heve heard from you is how he can't do it.
    I'll note that tracking a star does include the actual finding of that star
    in the image and that is the part of the software that he should be looking
    at. The whole process of tracking isn't needed by him and that part of the
    program should be ignored. Yet, you ignorantly state that because the
    program is designed to track a star, it isn't relavent at all to his

    May you reinvent the wheel everytime that you need one!
    Bob May, Sep 14, 2005
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.