. .
Page 6 of 33 FirstFirst ... 4567816 ... LastLast
  1. #51
    Joe,
    That would be good. It's downloaded everything at the second attempt but I'm now having to install java JDK in place of the vanilla version. We'll get there in the end. It's getting late here in WA (just after midnight) but a nightcap over ice is helping pass the time

    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.

  2. #52
    Joe,
    So here I am in the bright light of the morning
    No luck with the software I'm afraid. I got the following message from Maven about the lack of a compiler. I loaded the JDK version of Java, deleted and reloaded the vanilla one but nothing's changed. I read the Maven help file referenced later in the error report (not shown here) but didn't get anything I could see how to action from it.
    Unless there's an obvious way forward I'm going to wait until you produce the more easily installed package.
    -
    This has been a very interesting thread to follow, plenty of new knowledge about the use of lasers and taught wires learned. I need to build a more solid base for my machine than the reinforced office table it sits on at present and that will be the time for some minor mods and reworking aimed at improving the accuracy.
    Kit
    _
    c:\cnc\github\laserlevel>mvn package
    [INFO] Scanning for projects...
    [INFO]
    [INFO] -----------------------< webcam-apps:laserlevel >-----------------------
    [INFO] Building laserlevel 1.0-SNAPSHOT
    [INFO] --------------------------------[ jar ]---------------------------------
    [INFO]
    [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ laserlevel ---
    [INFO] Using 'UTF-8' encoding to copy filtered resources.
    [INFO] skip non existing resourceDirectory c:\cnc\github\laserlevel\src\main\resources
    [INFO]
    [INFO] --- maven-compiler-plugin:3.0:compile (default-compile) @ laserlevel ---
    [INFO] Changes detected - recompiling the module!
    [INFO] Compiling 4 source files to c:\cnc\github\laserlevel\target\classes
    [INFO] -------------------------------------------------------------
    [ERROR] COMPILATION ERROR :
    [INFO] -------------------------------------------------------------
    [ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
    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.

  3. #53
    Kit,

    You need java.exe on your PATH and setup another environment variable JAVA_HOME that points to the directory with the jdk in it. e.g. if java.exe is in c:\\java\jdkXXXX\bin\java.exe then JAVA_HOME must point to c:\\java\jdkXXXX

    Anyway to help i've put up a build in a zip file here:
    https://github.com/betzuka/laserleve...ilds/laser.zip

    Download that, unzip it and double click on laser.bat

    It still requires that you have java installed.

    Cheers, Joe

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


  5. #54
    Joe,
    Thankyou, that's brilliant. It works as simply as that!
    -
    For anyone else who want's to try it the only thing you need to know is how to dissable the built-in webcam on your laptop. Go into Device Manager, click on 'Cameras', Right-click on the entry for your buil-in camera and click 'dissable device'. This will cause the software to find your USB camera instead.
    -
    Unfortunately my Black & Decker 'CrossHair' level doesn't produce a suitable beam, it's a series of dots even though the source inside appears to have a curved lens in front. Perhaps the family of MYCNCUK contributers can come up with a list of commercial laser levels that produce a suitable, unbroken line.

    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.

  6. #55
    Kit,

    Did you remove the camera lens? Do you have a picture of the laser? If it is a single laser that produces a cross then it does not have a proper lens in my understanding, for example my laser produces a pair of crossed lines but it has two lasers, one vertical, one horizontal.

    I have updated the build to include a camera chooser if more than one camera is attached to the computer so you don't have to disable the built in one.

    https://github.com/betzuka/laserleve...r.zip?raw=true

    Joe
    Last edited by devmonkey; 26-08-2019 at 12:14 PM.

  7. #56
    Joe,
    You'll be calling it "Plug & Play" if you carry on like this! Exactly what most of your readers require, thankyou.

    I haven't got as far as mutilating my webcam just yet, the B&D laser beastie is many years old and is specifically designed to hang on a wall and produce a straight horizontal and vertical line along the same wall it's hung on rather than a horizontal line across the room. Laser units are cheap on eBay, it's just a matter of working out which ones to buy and how to mount them.
    I've yet to decide exactly how I'm going to use your program, with a laser or with John's sugestion using the image of a taught wire, or with both at different stages of setting up the whole machine. More thinking and experimenting is required to devise a method of aligning all the different parts of the machine in isolation and in the correct order to end up with a hand built machine that can cut out pieces with a much higher accuracy than the basic methods used to construct it.

    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.

  8. #57
    Hi Kitwin
    Glad you got the software going, pity you are so far away From Melbourne.

    Hi Devmonkey

    This weekend I experimented with the tools I had to hand. An Aldi Cheapie Laser and the Microsoft webcam. I wanted to understand my tools better.

    This session I left the lens on the camera and to avoid the distortion caused by the lens, I pointed the laser at a piece of flat finished black cardboard. I aimed the camera at the cardboard As you can see this cardboard caused the beam to appear very dim visually. However as the Graph below shows the camera responded very well to the beam. The software was able to discriminate the bright beam against a dark background very well. A nice sharp Gaussian peak was produced. i Am not sure what the white flecks are I grabbed the screen and each time they were in a different position They did not affect the resulting graph.

    However the setup reminded me that using a lens will change the resolution of the device.

    See the spreadsheet image below. For no particular reason I had placed the camera at a distance from the target that meant that the area covered was about 3.8 inches. This means that the 640 pixels of the image sensor will be divided over the 3.8 inches.

    I used gauge blocks to measure a distance of 0.05 inches. a difference of about 8.4 pixel lines. This means that the setup as illustrated can not resolve more than about 6 thousandths of an inch.(I did not attempt to read more than 1 digit past the decimal point in the output box) The results were repeatable.

    Clearly if a camera with a lens is to be used from wide angle to microscope the resolvable distance will be determined by the magnification power. A microscope would increase the resolution. As I am interested in wire alignment, using a lowish power microscope is worth consideration. Depth of field needs to be investigated.

    Yes I knew this before but making a test brings it into focus. (Excuse the pun!) It also made me think on other applications that may benefit from a wider field of view at a lower resolution. As tested 6 thousandths of an inch resolution over 3.8 inches is excellent. EDIT There may be some lens distortion of the image and therefore the linear accuracy that would need to be taken into account.

    My next tests will be with wire no lens.

    Regards
    John

    Three images below.
    Click image for larger version. 

Name:	0366 26-08-2019 8-45-57 PM.jpg 
Views:	236 
Size:	68.6 KB 
ID:	26316

    Click image for larger version. 

Name:	25-08-2019 10-59-56 AM.jpg 
Views:	249 
Size:	66.2 KB 
ID:	26317

    Click image for larger version. 

Name:	Calcs 26-08-2019 9-10-02 PM.jpg 
Views:	219 
Size:	363.5 KB 
ID:	26318
    Last edited by John McNamara; 27-08-2019 at 05:37 AM.

  9. #58
    John,

    Great stuff. The latest version of the software allows you invert the intensity so it should work with a wire (as a shadow camera). You can also input a pixel to um scale (or inches or whatever) so it reads in your calibrated units rather than pixels. There is a preferences option in the menu. Note it leaves the webcam image unchanged performs the inversion on the intensity profile before fitting the gaussian.

    FWIW the usb 1000x microscope I took apart to start this project at mid (say 100x) magnification is effectively 1:1 with the sensor area hence why it works so well without the lens. The magnification of these things seems to be defined as the multiplier of the subject size to screen size when displayed, i.e. it fully depends on the pixel pitch of your screen, thus should be largely ignored.

    My screen is 1440 pixels tall and has a height of 330mm therefore a vertical pitch of 1440/330 = 4.36 pixels/mm. Given the 640 pixel height we are using this implies a screen height of 147mm, so without the lens a 2mm test subject that appears 147mm tall is equivalent to magnifying 73x using the above very ropey definition of magnification.

    The depth of field of the usb microscope lens at the magnification you need is a few mm, should be sufficient. Non-linearity of your lens would have to be measured by focusing on a microscope scale, I have a couple of these that came with the cheepo usb microscopes.

    To my mind much easier to think it terms of subject size to sensor pixel pitch, e.g. with no lens and 640 pixel rows over 2mm we get 3um.

    Also something you must be aware of if trying to use a camera lens is that none of them are firmly fixed to the camera board meaning they will wobble and generate huge error as you move the camera around. The only solution I came up with for this was to find the focus/magnification you need then super glue the lens assembly in place. Also related is that the camera boards themselves are quite often not firmly fixed into the webcam cases causing the same problem. This is why I built a highly stable cube mount for the sensor (sensor is bolted hard to the delrin cube).


    Cheers, Joe
    Last edited by devmonkey; 26-08-2019 at 03:59 PM.

  10. #59
    Hi all,

    I've put a new version up with some major improvements, starting to turn into a piece of software I might use!

    So it will now allow you to record a bunch of measurements against a particular zero, and you can export these to the clip board for pasting into excel or whatever. It will also allow you to average the samples used in taking a measurement, this is set in the preferences and defaults to 10. Remember once you have calibrated it you can put in the scale per pixel so you get real units displayed and measured rather than pixels.

    Click image for larger version. 

Name:	screen_shot_2.png 
Views:	163 
Size:	338.3 KB 
ID:	26319

    Get the latest version here:
    https://github.com/betzuka/laserleve...r.zip?raw=true

    Cheers, Joe
    Last edited by devmonkey; 26-08-2019 at 06:26 PM.

  11. The Following 3 Users Say Thank You to devmonkey For This Useful Post:


  12. #60
    Quote Originally Posted by John McNamara View Post
    Hi Kitwin
    Glad you got the software going, pity you are so far away From Melbourne.
    I'm far away from everywhere!
    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.

Page 6 of 33 FirstFirst ... 4567816 ... 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
  •