Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: How to compress 16 bit ILDA file to 8 bit smoothly

  1. #1
    Join Date
    Nov 2010
    Posts
    9

    Unhappy How to compress 16 bit ILDA file to 8 bit smoothly

    Just test my new program which convert 16 bit ILDA file to 8 bit. I use 16bits data/328=8bit

    But I found the laser effect is very bad. I believe my program algorithm is not very good so that the effect is very ugly.

    Can any one tell me how to solve it?because I do not want to use 12,14 or 16bits D/A chip to solve it.After all its price is very expensive.

  2. #2
    mixedgas's Avatar
    mixedgas is offline Creaky Old Award Winning Bastard Technologist
    Infinitus Excellentia Ion Laser Dominatus
    Join Date
    May 2007
    Location
    A lab with some dripping water on the floor.
    Posts
    9,890

    Default

    On a microcontroller, with 16 bit registers, format it as a unsigned integer word, load it into a register and right shift it once.

    If you tell us which processor and language you are using, perhaps we can help you more.

    10 bits has been proven to be the minimum DAC you should use for good graphics, even more so if you wish to rotate or resize the image while playing it. It is not that much more expensive for a 10 bit DAC, and the final product will be much better.

    Steve

  3. #3
    Join Date
    Nov 2010
    Posts
    9

    Default I use 8 bit Atmel Chip and C

    On a microcontroller, with 16 bit registers, format it as a unsigned integer word, load it into a register and right shift it once.

    Actually I just load high 8 bit data to microcontroller chip registers. I Do not load low 8 bit data.

    Umm, It looks like I use wrong way to get data. Will test it! Thanks for your quick reply!

    Actually i just compress 16 bit ILDA data to 8 bit with VS2010.And wanna use algorithm to make points smoothly.

  4. #4
    Join Date
    Nov 2010
    Posts
    9

    Default your method is same as mine

    Just I check it. your method is same as mine.

    For example:
    Coordinate-X: 93 A6-->10010011 10100110

    right shit 8 bit 10010011-->93.

    In this way can not solve my problems. Laser effect is ugly.

  5. #5
    mixedgas's Avatar
    mixedgas is offline Creaky Old Award Winning Bastard Technologist
    Infinitus Excellentia Ion Laser Dominatus
    Join Date
    May 2007
    Location
    A lab with some dripping water on the floor.
    Posts
    9,890

    Default

    One problem is, when it is made, the artwork has data points added to it to make the scanners react in a certain way, to make the image look better. These points make corners sharper and fill in spaces between blanked parts of the image. When you shrink the file, those corrective signals change how the scanners react, they may become extra points in the image, or they may no longer be there.

    You may attach pictures to your post so we may see what is happening, click on "advanced" when posting.


    Steve

  6. #6
    Join Date
    Nov 2010
    Posts
    9

    Default just like attached photo

    I attached 16bit ILDA file and problem photo.

    Here I have another questions: I know some people also can get smooth effect with 8 bit DAC.
    Attached Thumbnails Attached Thumbnails 11.JPG  

    Attached Files Attached Files

  7. #7
    Join Date
    Aug 2009
    Location
    Bristol, England
    Posts
    333

    Default

    I don't think that is a rounding problem with the software, possibly a timing issue or even noise on the DAC reference pin.....

    If there was a problem with the rounding you would expect to possibly see it around zero where some rounding algorithms can glitch due to rounding positive values down and negative values up, but I am thinking timing issue here (the glitch looks brighter = scanners have slowed down).

    Stick a 'scope on it (in X/Y mode) and see what that reveals (If you have a 4 channel jobbie then sticking X,Y, LDAC (or whatever your DAC calls it) in there might be informative, as might toggling a pin at start of frame and using that to trigger the scope. .

    Regards, Dan.

  8. #8
    Join Date
    Dec 2006
    Location
    denver,co
    Posts
    1,078

    Default

    No matter what you do it is going to look like crap. You can't go from 65535 to 256 and expect decent performance. Not to mention that the pps speed is going to be all a out of whack now.

    I totally agree that 10 bit is the absolute minimum to do any xy scanning that looks decent.

    If you just want to make beams or simple sin /cos stuff the scanners will help round out the images but actual animation is going to look like those cheap Chinese dac boards , 8 bit.

    chad


    When the going gets weird, the weird turn pro.


  9. #9
    Join Date
    Mar 2010
    Location
    Raleigh, NC
    Posts
    2,292

    Default

    iShow DAC is 8bit and I have to shift bits to get the 16 bit ILDA files displayed on it. It does not like crap at all but I do have some hot spots too. I thought it was due to problems in iShow firmware but now I am starting to think that when shifting bits the resultant numbers turn out to be duplicated around curves. That could be a possibility and I will look into it with my software soon.

    But, as far as the image itself, it looks about the same as when projected from a 16bit DAC. Galvos are relatively slow devices so can't draw with great detail to begin with. Going from 16 to 8 bits doesn't have the same graphical effect as going from 16 to 8 bits on a precise monitor display.

  10. #10
    Join Date
    Dec 2006
    Location
    denver,co
    Posts
    1,078

    Default

    I built a 8 bit machine 24 years ago on a apple ][e. The difference between a 8 bit and a 12 bit is only about $11.00. All things considered it is only a couple of bucks. $14 dollars gets you 8 channels of fast 12 bit dac. You just need a micro that is fast enough to keep up with the laser data.

    Chad


    When the going gets weird, the weird turn pro.


Posting Permissions

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