. .

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Quote Originally Posted by driftspin View Post
    Hi guys,


    I recieved my cheap webcam today.

    It is a ASHU H800 1080p cam, about 18 euro incl shipping.

    https://a.aliexpress.com/Zos0Tdull


    If internals are really 1920x1080 (windows says it is) this might be an ok device.

    The chip size is ~6.5mm x ~3.2mm


    So this sensor could be 0.003mm ish per pixel.

    I wanted a bigger size sensor than the 640 pixel 2.5 mm one. Because of the width of the laser line on my bosch laser


    Does the software account for not having the sensor 100% level?
    I hope it does.

    Or does not having it level actually help achieve sub pixel accuracy .

    The lens can be screwed out and put back on so it is only exposed to dust while in use.

    I wil drill 2 mounting holes in the housing and bolt it to a piece of 4080 profile.


    I will try to install the software and try icw the bosch laser i have.

    Will report back on progress.





    Verstuurd vanaf mijn SM-A320FL met Tapatalk
    The app expects the sensor is in portrait orientation wrt the laser line, it then sums the intensity over each pixel row (sensor column) to produce an intensity curve which it post processes to determine the centre. This means if the laser line is at an angle to the sensor it doesn't matter, it should always find the height of maximum intensity at the centre of the sensor width. You don't want a crazy angle as it will reduce accuracy, a few degrees is fine though.

    I'm also going to move to a larger sensor, it takes too long to align the laser to the 2mm sensor over any reasonable distance.

  2. #2
    So I just tried it with a very nice cheap 1920x1080 camera from Amazon, sensor is perfect for our use, easy to rip apart and about 6mm of vertical resolution. However there is a problem, the library I'm using to connect to the camera only supports YUV format, which is a raw uncompressed image format. This means that over the USB connection higher def cameras cannot deliver the full frame rate of the camera because there is too much data to ship, I can only get 5 fps.

    I will have a look about for a different library, this would use MJPEG to compress the frames on the camera so they fit down the USB connection, that may in turn lead to other problems due to compression artifacts reducing the image accuracy, will have to see.

  3. #3
    Are you aware of this: https://openmv.io ?

    It is a single board computer with camera. You can develop machine vision algorithms in python or in C. They have different sensors but I am not sure they have one with a large enough area for what you desire.

    I can see how you would setup a single rail in a straight line with a laser/camera combination but don't understand how you would use a generated laser reference plane to setup a second rail.

    Dave.

  4. #4
    Quote Originally Posted by davebaldwin View Post
    I can see how you would setup a single rail in a straight line with a laser/camera combination but don't understand how you would use a generated laser reference plane to setup a second rail.
    Dave.
    Dave,
    Welcome to the forum (I see this is your first post). Make a nice hot cup of tea and read this thread from the start.

    Kit
    An optimist says the glass is half full, a pessimist says the glass is half empty, an engineer says you're using the wrong sized glass.

  5. #5
    Let me elaborate.

    To make a rail straight you are changing one degree of freedom so by mounting your camera on a rail truck with the laser pointing parallel to the desired path (and obviously intersecting the camera). A simple measure of how far off the centre of the laser beam gives you the amount of displacement of the rail you need to make before the rail is in line with the laser.

    Traditionally, to make a surface planar (or two surfaces separated by a gap) you would use a known good plane - i.e. surface plate and a marking out fluid. Blue up the surfaces and use the surface place to rub the marking fluid off the high spots. This then identifies where you need to scrape to bring both surfaces into the same plane. The marking process is essentially in 3D as it extends along the width, length and heigh of the target surface.

    Now for the laser plane method. Mount the laser plane generator on the master rail. Set the plane generator up so it is casting a reference plane parallel to the master rail and not at some pitch or roll error. On the slave rail mount the camera on a truck facing the master rail. Now the offset given by the camera from the laser's centre is how much in heigh the slave rail need to be moved. This is one dimension that has been taken care off. Sliding the slave truck (and maybe the laser plane generator as well) along the rail allows you to sample the height difference along the rail. Second dimension taken care off.

    The thing I am missing is how the 3rd dimension is taken care off? What we have done is to set the hight of a line on the slave rail to be the same height as the reference plane where it intersects the focal plane of the camera but not that the whole slave rail is in the same plane as the master rail. Looking at it another way we haven't set the roll (looking down the rail) of the master and slave rails to be the same. Is this a second order effect and it unlikely to be outside the planar tolerance of the trucks across the rails?

    Maybe this is covered elsewhere in the thread - I have read the whole thread over the months it has been running, but not in one sitting - and I apologise for the repetition in that case.

    On a separate note instead of having a fixed laser and rotating (expensive and hard to get) prism why not just rotate the laser? For this application I would have though the advantages of rotating a small piece of glass over a bulkier laser are necessary.

    Dave.

  6. #6
    Quote Originally Posted by davebaldwin View Post
    Let me elaborate.

    To make a rail straight you are changing one degree of freedom so by mounting your camera on a rail truck with the laser pointing parallel to the desired path (and obviously intersecting the camera). A simple measure of how far off the centre of the laser beam gives you the amount of displacement of the rail you need to make before the rail is in line with the laser.

    Traditionally, to make a surface planar (or two surfaces separated by a gap) you would use a known good plane - i.e. surface plate and a marking out fluid. Blue up the surfaces and use the surface place to rub the marking fluid off the high spots. This then identifies where you need to scrape to bring both surfaces into the same plane. The marking process is essentially in 3D as it extends along the width, length and heigh of the target surface.

    Now for the laser plane method. Mount the laser plane generator on the master rail. Set the plane generator up so it is casting a reference plane parallel to the master rail and not at some pitch or roll error. On the slave rail mount the camera on a truck facing the master rail. Now the offset given by the camera from the laser's centre is how much in heigh the slave rail need to be moved. This is one dimension that has been taken care off. Sliding the slave truck (and maybe the laser plane generator as well) along the rail allows you to sample the height difference along the rail. Second dimension taken care off.

    The thing I am missing is how the 3rd dimension is taken care off? What we have done is to set the hight of a line on the slave rail to be the same height as the reference plane where it intersects the focal plane of the camera but not that the whole slave rail is in the same plane as the master rail. Looking at it another way we haven't set the roll (looking down the rail) of the master and slave rails to be the same. Is this a second order effect and it unlikely to be outside the planar tolerance of the trucks across the rails?

    Maybe this is covered elsewhere in the thread - I have read the whole thread over the months it has been running, but not in one sitting - and I apologise for the repetition in that case.

    On a separate note instead of having a fixed laser and rotating (expensive and hard to get) prism why not just rotate the laser? For this application I would have though the advantages of rotating a small piece of glass over a bulkier laser are necessary.

    Dave.
    Hi Dave,

    I think you are conflating the rail itself with creating a planar surface to mount the rail. Imagine we are trying to create a surface plate from a an uneven slab of concrete say. You would mark out a grid of X-Y points on the slab, setup your laser plane and measure height error to the laser at each point. Take any 3 non-co-linear points (there is a method to pick the optimal 3 but it doesn't matter here), compute the equation of the virtual plane that intersects these 3 points, then correct all the other point error heights to this plane. Now shim or scrape as appropriate every point other than the 3 chosen, rinse and repeat until you are happy with the planar error.

    If this process was done using just two lines of points one under each rail centre then yes each rail would have a roll error (like setting up a perfectly planar razor blade under each rail and to them) but if you instead level a surface that the rail will sit on using this method (say level the entire 80mm steel beam in my case) then the roll error will be eliminated (sufficiently eliminated).

    Rotating a laser without a penta prism wont work as you cannot build a sufficiently well aligned laser mount, it will always cause the rotated laser to project a cone rather than a plane, this is the entire point of a penta prism, it is agnostic to variance in angle of incidence. Remember 1 arcsecond (1/3600 of a degree) will equate to ~5um of error at 1m. If your mount is say 100mm across this needs to be both machined and the laser somehow aligned to it all to within a tolerance of 0.5um, I reckon this is impossible.

    Cheers, Joe
    Last edited by devmonkey; 13-01-2020 at 11:46 AM.

  7. #7
    Thank Joe. I understand now. I think my confusion came from your first reply to me where you said "... so you can either zero both rails to this plane..."


    Have you seen this project. Looks like it shares some similarities but for a very different result.

    https://hackaday.io/project/21933-op...solution-laser

    Dave.

  8. #8
    Some notes on HD cameras for people wanting to move beyond VGA.

    Why bother? In order to get more vertical range, VGA gets you ~2mm which is not very much when starting with a very unlevel surface, and it is quite hard to align the laser to within 2mm of the thing you are trying to level, but not impossible by any means.

    Webcams usually produce two types of video stream, a compressed stream (usually MJPEG unless you have a 2-4k camera in which case it will be h264) and an uncompressed YUV stream. This app can only use the uncompressed stream, both because of how it interfaces to the camera, but also because compression introduces a load of artifacts into the image which will lead to alignment errors.

    The problem, most webcams use the USB2.0 standard to connect to your PC. USB2.0 can ship VGA(640x480) uncompressed at 30 fps, moving to FHD(1920x1080) this drops to 5 fps. This means it takes 6 times longer to take a reading, I don't know if this matters much other than slowing the whole process down.

    To get 1920x1080 at 30 fps you need a USB3.0 camera (and a PC with USB3.0 ports), these cameras are harder to come by and are more expensive. If you are looking for one then try and check what formats and rates it actually produces before you buy it.

    Hope this helps.
    Last edited by devmonkey; 13-01-2020 at 11:49 AM.

Thread Information

Users Browsing this Thread

There are currently 19 users browsing this thread. (0 members and 19 guests)

Similar Threads

  1. WANTED: K40 laser
    By dfox1787 in forum Items Wanted
    Replies: 0
    Last Post: 23-10-2018, 08:34 PM
  2. Newbie - Help With Laser Cutting Speed And Power - 60W Laser
    By nickpscott in forum Laser Machines & Building
    Replies: 2
    Last Post: 11-11-2015, 10:07 PM
  3. FOR SALE: K40 laser not working (laser fires)
    By calida in forum Items For Sale
    Replies: 0
    Last Post: 31-03-2015, 08:45 PM
  4. WANTED: GCc Laser Pro or Epilog Laser Cutter Machine
    By Brownhills school in forum Items Wanted
    Replies: 1
    Last Post: 10-05-2012, 04:30 PM
  5. help with cnc laser
    By swinds in forum Laser Machines & Building
    Replies: 11
    Last Post: 09-01-2012, 10:15 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
  •