. .
Page 5 of 33 FirstFirst ... 3456715 ... LastLast
  1. #41
    Hi Devmonkey

    Yes the line did produce a gaussian plot. It was a crude test. I just placed the paper in front of the Logitec camera about 150mm away no backlighting just ambient fluorescent (Its night time) I did get the curve plot. it was all hand held testing lots of movement. I really want to test it properly. It will be interesting to try inverting greyscale?.

    Cheers
    John
    Last edited by John McNamara; 20-08-2019 at 04:52 PM.

  2. #42
    To invert the greyscale add the following line to FrameAnalyzer.analyzeNextFrame() below where the rotation is performed:
    Core.rotate(mat, mat, Core.ROTATE_90_CLOCKWISE);
    Core.bitwise_not(mat, mat); <-- Add this line
    Last edited by devmonkey; 20-08-2019 at 05:03 PM.

  3. #43
    Hi Devmonkey
    Hi All

    First tests!

    Today I set up a quick test to determine what sort of accuracy might be achieved using a Webcam and laser.

    I mounted the webcam on a linear rail slide, I was going to use gauge blocks against a stop to measure the resolution of the device using a cheap laser that I picked up from Aldi one day. it is the only line laser I have. That did not work because the hard plastic ends on the linear rails were too flexible, I could not get constant results.....

    The Webcam is a 640 x 480 resolution Microsoft LifeCam VX -1000. It has an adjustable lens that I was unable to remove quickly so I just used it as is! Pointing the laser directly at the camera produced horrible flare. However angling the camera did work! I am not sure why? Probably something to do with the lens. The next tests will be done without a lens.

    I think you could say that the tests were a bit of a comedy of errors!

    Fortunately I has also set a magnetic base 0.01mm indicator on the rail. It saved the day. By simply pressing on the linear slide I was able to move the slide laterally about 0.04mm with medium pressure. when i released the pressure the indicator went back to zero. This is all I needed...

    Now for the exciting part; Hidden at the bottom of the Gaussian graph there is a tiny numeric value, It followed my indicator movement when I moved the slide. very roughly a value of 1 to 4 on the graph value to 1 to 4 ticks on the 0.01mm indicator. I assume this correlation may not have been planned however with the particular camera I used it was very convenient.

    I ran the test several times and it was repeatable.
    0.01mm is equal to .00039" (about 4 tenths)
    A very good result from a crude setup.

    The following improvements will no doubt greatly improve the results.

    A better camera with the lens removed.

    Controlled ambient light. moving around the room can move the graph also sunlight entering the room moved the graph.
    The sensor needs to be shaded as much as possible.

    The numeric values at the bottom of the screen needs to be enlarged. Optional rounding and time averaging settings that can be applied to the displayed number would help to reduce the flicker.

    I have yet to test the device with wire.

    Regards
    John

    Three images below:

    Homage to Johann Carl Friedrich Gauss https://en.wikipedia.org/wiki/Carl_Friedrich_Gauss

    And the measurement principal of reversal. https://www.google.com/search?q=meas...%3Apinterest.*


    Click image for larger version. 

Name:	Test 1 a 24-08-2019 2-02-15 PM.jpg 
Views:	267 
Size:	233.0 KB 
ID:	26280

    Click image for larger version. 

Name:	0 24-08-2019 12-59-00 PM.jpg 
Views:	238 
Size:	127.1 KB 
ID:	26282

    Click image for larger version. 

Name:	1 24-08-2019 12-59-50 PM.jpg 
Views:	217 
Size:	127.3 KB 
ID:	26281

  4. #44
    Hi John,

    Yes the tiny number is the deviation in pixels from where you pressed zero.

    I don't think it was ambient light affecting your setup, the laser saturates the sensor. It is so sensitive it will easily pick up deflections in your floor from walking about. This happened when I was testing too, I had to sit completely still. It is less sensitive to walking about on a 6 inch bare concrete slab but you can still move it a few pixels.

    You don't need a better camera you just need to rip the optics off that one. The difference in quality between webcams of the same resolution is simply the optics.

  5. #45
    Hi DevMonkey

    I just did this calc in Excel

    sensor size in mm 2
    / pixels 640
    Space between pixel lines = 0.003125 mm

    I got roughly 1 integer value change to 0.01mm div on the Mitutoyo indicator.
    Quite a big variation?

    Regards
    John

  6. #46
    My setup works out at the predicted resolution of 3um per pixel. I don't think you can trust this at all with your setup as the optics are still attached but with nothing to focus on. You are also getting a load of noise on the gaussian, this is probably either a function of the crappy optics on the camera or the laser line is using a diffraction pattern rather than a cylindrical lens.

    Rip the lens off the camera, then you will also be able to see if the sensor is indeed 2mm.

    If you think about it, without optics and the laser projected directly onto the sensor moving the sensor 1 pixel will shift the maximum intensity one pixel, there is no other option as the sensor and beam have moved relatively and the intensity profile of a cross section of the laser line hitting the sensor has not changed.
    Last edited by devmonkey; 24-08-2019 at 02:02 PM.

  7. #47
    Hi Devmonkey

    Your comment.....
    "or the laser line is using a diffraction pattern rather than a cylindrical lens."

    Yes I think there is a problem with the laser source.

    Without the lens the graph is far worse with multiple peaks. Upon opening the case there is a shaped plastic stepped prism that limits the beam to 90 degrees of coverage. the step is in the middle of the laser. (There are actually 2 similar laser sources in the unit) both are the same. it is not a tubular lens.

    I will have to source a good quality line laser. not sure where yet?

    The camera sensor appears to be closer to 3.5mm wide including the border so I guess the active area to be about 3mm wide. Its a fairly old unit but it works well.

    Regards
    John

  8. #48
    Hi John,

    I'm just using a bog standard Dewalt laser level, part number DW088.

    I'm curious, the laser you have, how thick is the line at 2 and 5 or more meters? If it is still a nice narrow line 2-4mm thick it could still be usable, try moving it further away from the sensor. Also try using the laser without the case on, maybe the window is distorting it as well?

    The £3 diffraction based lasers I have that are total rubbish but still work but can only be focused to a fine line line at a specific distance making them useless for any actual measurement we need.

    This is what the crap lasers look like looking into the lens:
    Click image for larger version. 

Name:	crap_laser.png 
Views:	209 
Size:	821.7 KB 
ID:	26294

    This is what a cylindrical lens looks like on the DW088
    Click image for larger version. 

Name:	dewalt_lens.png 
Views:	211 
Size:	706.6 KB 
ID:	26295

    I haven't tried one but this looks like it might work well:
    https://banggood.app.link/AAvDRpISpZ
    Cheers, Joe
    Last edited by devmonkey; 24-08-2019 at 03:57 PM.

  9. #49
    Joe,
    I've cloned the repository to my W10 laptop but installing Maven doesn't seem to have worked though I think I've followed the instructions. 'mvn' is unrecognised as an instruction by the Windows command prompt anyway. Is there any chance of a more idiot-friendly installation of your software?

    EDIT: OK I've got the Maven path variable correct this time and something's beginning to happen!

    Kit
    Last edited by Kitwn; 24-08-2019 at 04:39 PM. Reason: It's working!
    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.

  10. #50
    Hi Kitwin,

    Glad you are making progress. It is a bit of a pain to do if you don't already have a dev environment setup I agree. When I get time and when the software has evolved into a usable state i'll generate some native executables people can just download an run.

    Cheers, Joe

  11. The Following User Says Thank You to devmonkey For This Useful Post:


Page 5 of 33 FirstFirst ... 3456715 ... LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 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
  •