Page 2 of 2 FirstFirst 12
Results 11 to 19 of 19

Thread: ILDA test pattern coordinates

  1. #11
    Join Date
    May 2006
    Location
    Native Floridian
    Posts
    3,127

    Default

    I know a guy who works in a different industry that uses scanners, and he was curious to see what the pattern looked like. He makes his own DAC and wasn't aware of specific ways of tuning the scanners. He'll probably add the frame data to the dac just for testing/diagnostic purposes.

  2. #12
    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

    Good cause I smell a product Idea.
    Always wanted to do it anyways.

    Steve
    Qui habet Christos, habet Vitam!
    I should have rented the space under my name for advertising.
    When I still could have...

  3. #13
    Join Date
    Jan 2006
    Location
    Charleston, SC
    Posts
    2,147,489,446

    Cool

    Quote Originally Posted by mixedgas View Post
    Good cause I smell a product Idea.
    Always wanted to do it anyways.
    Would this be related to your $5 quad-squarewave generator for tuning on-site? As in, a portable plug-in ILDA test pattern generator? If so, I might have to kiss you Steve...

    Adam

  4. #14
    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

    Quote Originally Posted by buffo View Post
    Would this be related to your $5 quad-squarewave generator for tuning on-site? As in, a portable plug-in ILDA test pattern generator? If so, I might have to kiss you Steve...

    Adam
    save the kisses and be customer #1

    Steve
    Qui habet Christos, habet Vitam!
    I should have rented the space under my name for advertising.
    When I still could have...

  5. #15
    Join Date
    May 2008
    Location
    nerdtown, USA
    Posts
    1,165

    Default

    Quote Originally Posted by mixedgas View Post
    save the kisses and be customer #1

    Steve
    w00t I got mine working with the arduino and the dual MCP4921 shield :-)

    about two hours work :-)

    I probably ought to implement blanking though...

  6. #16
    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

    Quote Originally Posted by heroic View Post
    w00t I got mine working with the arduino and the dual MCP4921 shield :-)

    about two hours work :-)

    I probably ought to implement blanking though...
    with 2 bits of color so you can see the circle against the square, that would work. Care to share the files?
    Arduino had enough rom?

    The reason I'm asking is it looks like 17$ a board to make the PCB for the ILDA TEST frame dumper, and another 20 in parts in small Q, if I do it without a micro.
    I can do it with eprom, counters and logic and fit the ILDA, LM, and two other test patterns on the board, but we're looking at 37$ just for the raw parts after shipping
    Parallel input 12 bit dacs have shot up in price. AD7541 and its clones are NOT cheap anymore. 7.81 each.
    If I do the logic in a micro, costs go down a bit, but not much. I'd need to make a small profit on my time spent burning roms and micros to aid in funding the laser habit, so we're probably looking at 55$ a module just for 4 test patterns. Cost would go down a bit if I used SMD, but not much, as I dont have really good soldering for SSOP packages. I'd have to sell quite a few to justify a toaster oven controller and stencils.

    So it looks better to do the low cost dac then the ILDA dumper, or to just do a few ILDA dumpers by hand and lease them.

    Now if the boards were done in China or India that may go way down, but I have not and refuse to,export anymore of my disposable money to BigBoxMart nations.

    Steve
    Last edited by mixedgas; 05-13-2009 at 15:23.
    Qui habet Christos, habet Vitam!
    I should have rented the space under my name for advertising.
    When I still could have...

  7. #17
    Join Date
    May 2008
    Location
    nerdtown, USA
    Posts
    1,165

    Default

    Quote Originally Posted by mixedgas View Post
    with 2 bits of color so you can see the circle against the square, that would work. Care to share the files?
    Arduino had enough rom?
    Lemme rework this so it has some kind of consistent timing... right now it just bangs the points out as fast as it can.

    Yes, Arduino has plenty of ROM, the one I have here has 128k of ROM (it's an Arduino Mega).

  8. #18
    Join Date
    Feb 2011
    Posts
    1

    Default

    Quote Originally Posted by drlava View Post
    Here you go... easy in MATLAB since I already had the ILDA format loading written. This is the full size frame, should be scaled to 8 degrees.
    Why do you want it this way?

    i know this is an old thread, but drlava do you happen to have the matlab code for loading .ild files, any help would be greatly appreciated

  9. #19
    Join Date
    Oct 2006
    Location
    Cleveland, Ohio
    Posts
    2,342

    Default ilda read matlab

    Sure, let me dig that out... This is only suitable for testing work and doesn't support format 2 palettes, but here's what I have:

    Code:
    function [f,type,endbyte,more]=ildopen(file,startbyte)
    %opens ilda file and reads frame starting at startbyte (second parameter 0 indexed)
    %returns a matrix [x y colorindex blanked]
    % 
    fid=fopen(file,'r','b');
    fseek(fid,7+startbyte,-1);
    type=fread(fid,1,'char');
    switch type
    case {0} %ignore z data for now
        fseek(fid,16,0);
        size=fread(fid,1,'ushort');
        if size ~= 0
            fseek(fid,6,0);
            frameloc=ftell(fid);
            x=fread(fid,size,'short',6);
            fseek(fid,frameloc+2,-1);
            y=fread(fid,size,'short',6);
            fseek(fid,frameloc+6,-1);
            b=fread(fid,size,'uchar',7);
            fseek(fid,frameloc+7,-1);
            c=fread(fid,size,'uchar',7);
            endbyte=ftell(fid)-7;
        else
            x=0;y=0;c=0;b=0;endbyte=0;
        end
    case {1} %2D paletted ilda
        fseek(fid,16,0);
        size=fread(fid,1,'ushort');
        if size ~= 0
            fseek(fid,6,0);
            frameloc=ftell(fid);
            x=fread(fid,size,'short',4);
            fseek(fid,frameloc+2,-1);
            y=fread(fid,size,'short',4);
            fseek(fid,frameloc+4,-1);
            b=fread(fid,size,'uchar',5);
            fseek(fid,frameloc+5,-1);
            c=fread(fid,size,'uchar',5);
            endbyte=ftell(fid)-5;
        else
            x=0;y=0;c=0;b=0;endbyte=0;
        end
    case {4} %3D 24 bit color ilda
        fseek(fid,16,0);
        size=fread(fid,1,'ushort'); %read in number of points
        if size ~= 0
            fseek(fid,6,0); %skip to frame data
            frameloc=ftell(fid);
            x=fread(fid,size,'short',8);
            fseek(fid,frameloc+2,-1);
            y=fread(fid,size,'short',8);
            fseek(fid,frameloc+6,-1);
            b=fread(fid,size,'uchar',9);
            fseek(fid,frameloc+7,-1);
            c=fread(fid,size,'ubit24',7*8);  %skip is in bits
            endbyte=ftell(fid)-7; %remove final skip
        else
            x=0;y=0;c=0;b=0;endbyte=0;
        end
    case {5} %2D 24 bit color ilda
        fseek(fid,16,0);
        size=fread(fid,1,'ushort'); %read in number of points
        if size ~= 0
            fseek(fid,6,0); %skip to frame data
            frameloc=ftell(fid);
            x=fread(fid,size,'short',6);
            fseek(fid,frameloc+2,-1);
            y=fread(fid,size,'short',6);
            fseek(fid,frameloc+4,-1);
            b=fread(fid,size,'uchar',7); 
            fseek(fid,frameloc+5,-1);
            c=fread(fid,size,'ubit24',5*8); %skip is in bits
            endbyte=ftell(fid)-5;
        else
            x=0;y=0;c=0;b=0;endbyte=0;
        end
    otherwise
        disp('Unknown frame format');
    end
    more=0;
    if ~fseek(fid,33,0)
        more=1;
    end
    fclose(fid);
    f=[x,y,c,bitget(b,7)];
    You use it like this:

    Code:
    file='ildatestA.ild';
    
    nextframeindex=0;
    more=1;
    framecount=0;
    
    while more==1
        frameindex=nextframeindex;
        [Frame,Type,nextframeindex,more]=ildopen(file,frameindex);
        framecount=framecount+1;
        disp(frameindex)
    end

    What are you up to?
    Last edited by drlava; 04-30-2011 at 08:22.

Posting Permissions

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