+ Reply to Thread
Page 1 of 3 123 LastLast
Results 1 to 20 of 49

Thread: Using Parallax Laser Rangefinder as a camera.

  1. #1

    Default Using Parallax Laser Rangefinder as a camera.

    If I am reading the datasheet correctly the only image formats that can be obtained are:
    160x128 8-bit grayscale
    640x16 16-bit color (w/laser enabled)

    I'm confused by the 640x16 color resolution.

    Is there any way to get a high resolution (640x480) color image data from this ? Preferable with the laser disabled.
    I would guess the camera can do it, but you need an NDA to get the datasheet.

    Bean
    Last edited by Bean; 10-11-2011 at 07:56 PM.

    Esterline Research & Design
    thitt@esterlineresearch.com

    We offer consulting on the following areas of expertise:
    Frequency Control - Micro-Controller/Processor Projects
    Test and Automation - General Programming and Coding
    Circuit Design - Board Layouts

  2. #2

    Default Re: Using Parallax Laser Rangefinder as a camera. Confused by datasheet...

    Bean, where would you store 640x480x3 bytes of data if you could get that much from the sensor?

    -Phil

  3. #3

    Default Re: Using Parallax Laser Rangefinder as a camera. Confused by datasheet...

    Phil,
    I don't know what the slowest clock speed is. But there are various propeller boards with additional SRAM on them that could be used.
    Initially I would like to do experiments by processing the image data "on-the-fly" again if the camera clock speed can be slowed down enough.
    Either way it would be a pretty good generic digital camera for any microcontroller if it just had the commands to get full-frame color data (even 160x128 8-bit color would be okay with me).

    Bean

    Esterline Research & Design
    thitt@esterlineresearch.com

    We offer consulting on the following areas of expertise:
    Frequency Control - Micro-Controller/Processor Projects
    Test and Automation - General Programming and Coding
    Circuit Design - Board Layouts

  4. #4

    Default Re: Using Parallax Laser Rangefinder as a camera. Confused by datasheet...

    If I could get a color picture out of one of these, I think I'd purchase one.

    One should be able to look for color blobs without keeping the whole image in memory.

    I'd also like to try using it with one of the many external memory options.

    Having access to the color image would make this a more attractive product.

    Duane

  5. #5

    Default Re: Using Parallax Laser Rangefinder as a camera. Confused by datasheet...

    Bean in the OVM7690_obj.spin seems to allow for some settings but I haven't even hooked a prop clip to mine to play yet.

    Edit: I have used it normally though!
    Code:
                                                                                                                                               
     
    CON                                                                                                                                        
      OVM7690_Addr  = %0100_0010     ' SCCB/I2C address: corresponds to write address $42 and read address $43                                 
     
      CamXVCLKFreq  = 24_000_000     ' XVCLK frequency determines SCCB (Serial Camera Control Bus) speed, OVM7690 data sheet section 1.2.9     
     
      ' I/O pin connections to the Propeller                                                                                                   
      ' Others defined in OVM7690_fg                                                                                                           
      CamPWDN         = 8                                                                                                                      
      CamSDA          = 9                                                                                                                      
      CamSCL          = 10                                                                                                                     
      CamXVCLK        = 14                                                                                                                     
     
      ' Frame grab type                                                                                                                        
      GreySingle     = 0  ' single greyscale frame                                                                                             
      ColorSingle    = 1  ' single color frame                                                                                                 
      ColorRange     = 2  ' color frame grab specific for range finding:                                                                       
                          ' one with laser on, one with laser off, background subtraction for better detection of laser spot                   
                          ' details of pixel subtraction: http://homepages.inf.ed.ac.uk/rbf/HIPR2/pixsub.htm                                   
     
      ' Results display type                                                                                                                   
      ResultASCII    = 0                                                                                                                       
      ResultBinary   = 1
    Attached Files Attached Files
    Last edited by ratronic; 10-05-2011 at 11:30 PM.
    Fix it, if it ain't broke! .......... D Rat .......... Dave ..........

  6. #6

    Default Re: Using Parallax Laser Rangefinder as a camera. Confused by datasheet...

    Looking at the code I think it IS possible to get a full color 640x480 image.
    I have a LRF on order, just need to wait for it to arrive. I can't wait to start experimenting. Waahhh, haaa haaa, haa haa.

    Bean

    Esterline Research & Design
    thitt@esterlineresearch.com

    We offer consulting on the following areas of expertise:
    Frequency Control - Micro-Controller/Processor Projects
    Test and Automation - General Programming and Coding
    Circuit Design - Board Layouts

  7. #7

    Default Re: Using Parallax Laser Rangefinder as a camera. Confused by datasheet...

    At the top of that spin program it notes you have to sign a non disclosure agreement with Omnivision to obtain the data for that camara. But Joe has written some methods to set the resolution and different frame grabs for grey scale or color with the laser on or off.
    Fix it, if it ain't broke! .......... D Rat .......... Dave ..........

  8. #8

    Default Re: Using Parallax Laser Rangefinder as a camera. Confused by datasheet...

    I got the LRF sensor on Friday. Got around to playing with it today.

    The sensor is too fast to do any kind of processing on-the-fly. Pretty much you can just store the data.

    So I guess the question is would you rather have high-resolution and low bits per pixel, or low-resolution and high bits per pixel ?

    I'm thinking about trying 120x90 16-bits per pixel (5,6,5). That should be usable.

    Bean

    Esterline Research & Design
    thitt@esterlineresearch.com

    We offer consulting on the following areas of expertise:
    Frequency Control - Micro-Controller/Processor Projects
    Test and Automation - General Programming and Coding
    Circuit Design - Board Layouts

  9. #9

    Default Re: Using Parallax Laser Rangefinder as a camera. Confused by datasheet...

    Bean,

    Do you have access to the high res color images?

    Even if just one frame at a time that can be stored to external memory.

    I'd like the option of having a high res color image that I could then look at (with a program on the Prop) and find color blobs etc.

    Can you capture a 640 x 480 (I think16-bit color would be good enough) image?

    The ability of access a high res color image is an important feature to me.

    Thanks for the update.

    Duane

  10. #10

    Default Re: Using Parallax Laser Rangefinder as a camera. Confused by datasheet...

    Duane,
    The problem is that the camera supplies the pixel clock. The clock rate is 1MHz (I think, might be 500Khz), so it doesn't leave alot of time to do much processing.
    I don't have a C3 or other board with SRAM, so I don't know how it compares to HUB access in speed.
    There might be a way to slow down the pixel clock ? I don't know
    From what I've seen, you CAN get a 640x480 color image (8 bit Y, 8 bit U, 8 bit V). But you need a storage media that is fast enough to store it.

    Bean

    Esterline Research & Design
    thitt@esterlineresearch.com

    We offer consulting on the following areas of expertise:
    Frequency Control - Micro-Controller/Processor Projects
    Test and Automation - General Programming and Coding
    Circuit Design - Board Layouts

  11. #11

    Default Re: Using Parallax Laser Rangefinder as a camera. Confused by datasheet...

    Bean,

    My thought is to have data passed directly to some SRAM. This seems like the problem a solution of eight parallel SRAM chips has been waiting for.

    The Prop could then leisurely look through the data for color blobs etc.

    Do you think this would be possible? (I wont hold you to it.)

    I'll likely buy one of these if you think this would work.

    Thanks for all the information so far.

    Duane

  12. #12

    Default Re: Using Parallax Laser Rangefinder as a camera. Confused by datasheet...

    Duane,
    I'd say it is do-able. The code for the 640x16 frame grabber actually sets up the camera for 640x480, then skips the first 200+ lines to get to the middle 16 that it wants to store.

    WRBYTE is pretty slow, so external SRAM may not be too much slower (if any).

    Just to get familiar with the frame grabber code, I optimized it somewhat and perform the byte-swap "on the fly" so you don't need to do it at the end.

    I wish Joe would have made a simple camera board with some SRAM. I think it would have sold very well.

    Bean

    Esterline Research & Design
    thitt@esterlineresearch.com

    We offer consulting on the following areas of expertise:
    Frequency Control - Micro-Controller/Processor Projects
    Test and Automation - General Programming and Coding
    Circuit Design - Board Layouts

  13. #13

    Default Re: Using Parallax Laser Rangefinder as a camera. Confused by datasheet...

    Thank you Bean.

    It's very nice to know all this ahead of time. I think I'll probably order one of these.

    Personally I thought it was priced a bit high. If you just want a rangefinder, I think a laser a Wii camera would likely do the job and be a lot less expensive.

    Having access to the camera image makes the Parallax Laser Rangefinder a much more useful product.

    Duane

  14. #14

    Default Re: Using Parallax Laser Rangefinder as a camera. Confused by datasheet...

    Duane,
    I was wrong about the pixel rate, it is 2MHz.

    I have made changes to the firmware to allow a color capture of 120x85 pixel frame in the same format as the 640x16 frame (16-bit YUV422y1,u,y2,v]) by sending the character "Y".
    At the moment I don't have any way to seeing the image data.
    If I post the code would have the ability to test it ?

    Bean

    Esterline Research & Design
    thitt@esterlineresearch.com

    We offer consulting on the following areas of expertise:
    Frequency Control - Micro-Controller/Processor Projects
    Test and Automation - General Programming and Coding
    Circuit Design - Board Layouts

  15. #15

    Default Re: Using Parallax Laser Rangefinder as a camera. Confused by datasheet...

    Bean I am still unable to play with mine as I don't have a prop 'clip' only some prop 'plug's. But I plan on soldering a 4 pin header to mine and use prop plug instead of a prop clip. I also had been planning to use a uOLED-128-G1 to display portions of the data dumps. I'm not sure when I'll get this done. I'm off to google YUV422y1 now to see if I can get the uOLED to display that. Can you post your version of the firmware?
    Fix it, if it ain't broke! .......... D Rat .......... Dave ..........

  16. #16

    Default Re: Using Parallax Laser Rangefinder as a camera. Confused by datasheet...

    Sure here it is. It is setup to use pins 30 and 31, so if you want to use Sin and Sout pins you'll have to change it at the beginning of the main file "LRF_OVM7690_Modified.spin".
    Send it a "U" to setup the auto-baud.
    Send it a "Y" to request a full color frame (120 x 85 pixels).

    The pixels are send as pairs consisting of 4 bytes [y1,u,y2,v] so the same "u" and "v" values are used for both pixels y1 and y2 (which have the luma or grayscale value). All are 8-bits. "u" and "v" are signed.
    So each line is 240 bytes.

    A good starting point would be to display just the y1 and y2 as grayscale (ignoring "u" and "v").

    Bean
    Last edited by Bean; 10-11-2011 at 07:44 PM.

    Esterline Research & Design
    thitt@esterlineresearch.com

    We offer consulting on the following areas of expertise:
    Frequency Control - Micro-Controller/Processor Projects
    Test and Automation - General Programming and Coding
    Circuit Design - Board Layouts

  17. #17

    Default Re: Using Parallax Laser Rangefinder as a camera. Confused by datasheet...

    Is y1 an 8 bit grayscale by itself?
    Fix it, if it ain't broke! .......... D Rat .......... Dave ..........

  18. #18

    Default Re: Using Parallax Laser Rangefinder as a camera. Confused by datasheet...

    Yes, y1 and y2 are 8 bit grayscale values for the two pixels. You only need "U" and "V" if you want color.

    Bean

    Esterline Research & Design
    thitt@esterlineresearch.com

    We offer consulting on the following areas of expertise:
    Frequency Control - Micro-Controller/Processor Projects
    Test and Automation - General Programming and Coding
    Circuit Design - Board Layouts

  19. #19

    Default Re: Using Parallax Laser Rangefinder as a camera. Confused by datasheet...

    When you say two pixels I'm not sure what you mean. The uOLED can display a grayscale image with one byte per pixel?
    Fix it, if it ain't broke! .......... D Rat .......... Dave ..........

  20. #20

    Default Re: Using Parallax Laser Rangefinder as a camera. Confused by datasheet...

    Bean,

    I just looked through the code. It's amazingly well documented.

    I agree with you, if I can find a way of storing the data, I should be able to save a high res image.

    I was just looking at the schematic and the product photo. It looks like pins 16 - 23 aren't used and are brought out to solder pads (very nice). I think I'll use these pins for SRAM data lines and use the red and green LED pins for clock and chip select.

    Color blobs and world conquest here I come. (I just need to ask my wife first.)

    Duane

+ Reply to Thread

Similar Threads

  1. Prototype Parallax Rangefinder on Hackaday
    By localroger in forum General Discussion
    Replies: 6
    Last Post: 06-27-2011, 08:22 AM
  2. Laser Rangefinder
    By mods in forum Robotics
    Replies: 4
    Last Post: 08-09-2009, 06:25 AM
  3. Cheap Laser Rangefinder / Distance Measurer Sensor
    By Ben Ward1e in forum Robotics
    Replies: 23
    Last Post: 11-25-2006, 10:43 AM
  4. laser rangefinder/imaging???
    By SK8 4 U in forum General Discussion
    Replies: 1
    Last Post: 05-15-2005, 03:08 PM
  5. Laser Rangefinder
    By Archiver in forum BASIC Stamps Archive
    Replies: 0
    Last Post: 10-04-2003, 12:47 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts