Advice wanted re sort routines & histogram analysis

General FreeBASIC programming questions.
TESLACOIL
Posts: 1769
Joined: Jun 20, 2010 16:04
Location: UK
Contact:

Advice wanted re sort routines & histogram analysis

Postby TESLACOIL » Aug 08, 2011 1:01

Advice wanted ref sort routines & spectrum analysis

basically i want to load a 16bit bmp & count how many times each & every colour occurs. This is quite cpu intensive at the moment. Any ideas how to do the efficiently would be welcome.

then i want to to sort it into a list, ( thousands of different colour numbers) and create a histogram , say common colors on the right, rare or missing colours on the left. You can just about display the output on a large monitor if you split it into sections.

ideally i need to chew threw several 1000 bmps and get an overall average. The entire picture set is fast approaching a million, ill prolly need 10k samples minimum.


I have 2 problems ,

1 im getting my code tied in big ugly knots (whats new lol )

2 due to vast amount of number crunching this seems ? to require it might be an idea to investigate some wizard mathematical scheme to reduce the computational time to days and not weeks

any clues from you mathematical /coding wizards out there ?


ill prolly use a bar graph something like this to display the results.
lower or left most regions levels displaying values 1/10th smaller

Code: Select all


screenres 1360,600,16
dim as integer i ,x,y,c

c=999
for y=30 to 600 step 30
c=c+c
for i=10 to 1300 step 2:line (i,y)-(i,y-(i/50)),c : next i
next y

sleep:end


MichaelW
Posts: 3500
Joined: May 16, 2006 22:34
Location: USA

Postby MichaelW » Aug 08, 2011 3:15

Are you sure about the 16-bit bitmap? The color data will be smaller, but likely at the expense of processing speed.
TESLACOIL
Posts: 1769
Joined: Jun 20, 2010 16:04
Location: UK
Contact:

16bit is good enough

Postby TESLACOIL » Aug 08, 2011 17:43

16bit is good enough for my ai project.

There is only a slight loss in picture quality due to the lack of colours. the webcam captures at 24 bit , or should i say it saves is as a 24bit bmp For fast feature exaction its useful to later on reduce the color set even further eg 1000 colours , 256 , 16 , greyscale , black and white etc etc

I need to chew through my test set of pictures to extract various baselines. Knowing in advance what colours are out there and in what proportion after being filtered via webcam internals , compression to bmp , and conversion by being loaded into freebasic via bload testpic.bmp





The information extracted by my test set is critical. It is one of the few things i can do in advance. This reduces the amount of computation on the fly. When the vision system is running in realtime key frames will be analyzed ( say just 100 or 1000 pixels ) and compared to the base lines.

The webcam settings are locked down so its highly sensitive to small changes in light. In auto mode i dont have access to or control over what the webcam is doing to the input stream. This obfuscates the data stream.

The ai has to wear sunglasses when its out door lol. or its suffers from whiteout. But that is just a single change the AI is in control off. Sunglasses off sunglasses on. This allows it to see very well in low light conditions, its designed to operate indoors. So its optimized for these light levels.






I would love to use 32bit and HD quality frames @ 50fps but then i would need 100pcs to deeply process the data stream in realtime and not 6pcs currently dedicated to real time vision. Even with 6pcs im struggling to keep the frame at rate @5fps 640x480 16bit.

The more you cheat , the less aware and intelligent the system is. It would be more correct to say im building an artificial eye than a robotic vision system.
dodicat
Posts: 6390
Joined: Jan 10, 2006 20:30
Location: Scotland

Postby dodicat » Aug 08, 2011 21:40

Hi TESLACOIL

I have several bitmap routines made up.
Here's one I dug out, compile to exe, and drag and drop a bitmap onto it.
It will create "newsprite.bas" which runs the bitmap back to you, but it is now in colour data format.

Code: Select all


'sprite maker
'compile this to .exe
'drag a .bmp file on to the this executable
'it will create newsprite.bas (somewhere)
'run newsprite.bas to view the bitmap data and test the conversion.
Screen 19,32
open "newsprite.bas" for output as #2

Type bitmap_size
    As Integer across,down
End Type

Dim  mybitmap As String =Command(1)


Redim shared As uInteger pixel_colours(0,0) 'shared to increase potential size

Function size(bmp As String) As bitmap_size 'fetch bitmap width/height
    Dim As Integer w,h
    Open bmp For Binary As #1
    Get #1, 19, w
    Get #1, 23, h
    Close #1
    Return Type<bitmap_size>(w,h)
End Function

Sub load(bmp As String,pixels() As Integer) 'load bitmap into array of point colours
    Bload bmp
    dim count as integer
    dim as string comma=","
    dim as string dash="_"
    Dim temp As bitmap_size=size(bmp)
    Redim pixels(temp.across,temp.down)
    dim max as integer=(1+temp.across)*(1+temp.down)
    For x As Integer=0 To temp.across
        For y As Integer=0 To temp.down
            count=count+1
            pixels(x,y)=Point(x,y)
            if count=max then
                comma=""
                dash=""
            end if
            print #2,"&H"& hex(point(x,y))&comma;
            if count mod 8=0 then print #2,dash
        Next y
    Next x
End Sub

'Use mouse or keys to move bitmap in this run
Sub drawbitmap(mx As Integer,my As Integer,mybitmap As bitmap_size,scale as single=1)
    #macro magnify(pivotx,pivoty,px,py,scale)
    var rotx=scale*(px-pivotx)+pivotx
    var roty=scale*(py-pivoty)+pivoty
    #endmacro
    For x As Integer=mx To mx+mybitmap.across
        For y As Integer=my To my+mybitmap.down
            'Pset (x,y),pixel_colours(x-mx,y-my)
            magnify(mx,my,x,y,scale)
            line(rotx-scale/2,roty-scale/2)-(rotx+scale/2,roty+scale/2),pixel_colours(x-mx,y-my),BF
        Next y
    Next x
End Sub
'____________________________
Sub framecounter
    Static As double frame,fps
    frame=frame+1
    Static As double t1,t2
    If frame>=fps Then
        t1 = Timer
        fps = frame/(t1-t2)
        Windowtitle "Frames per second = " & fps
        t2=Timer
        frame=0
    End If
End Sub
'______________________________________
'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Dim As bitmap_size bitmap_info=size(mybitmap) 'get height/width of bitmap
print #2,"redim shared as uinteger a(";str(bitmap_info.across);",";str(bitmap_info.down);")"
print #2 ,"DATA _"
load mybitmap,pixel_colours() 'set bitmap into an array

'variables for the mouse and arrow keys
Dim As Integer mx,my,mw,mb,copymx,copymy
dim as string i
'Testing loop for this section.
Do
    Getmouse(mx,my,mw,mb)
    if mb=2 then exit do
    if mw<0 then mw=10
    if mw=0 then mw=1
    If mb=1 Then
        copymx=mx:copymy=my
    End If
    i=inkey
    if i= chr(255) + "K"  then copymx=copymx-5
    if i= chr(255) + "M"  then copymx=copymx+5
    if i= chr(255) + "P"  then copymy=copymy+5
    if i= chr(255) + "H"  then copymy=copymy-5
   
    Screenlock
    Cls
   
    drawbitmap(copymx,copymy,bitmap_info,mw/10) 'SCALE
    draw string(20,20),"TURN MOUSE WHEEL  --- MAGNIFICATION = "&str(mw/10)
    draw string(20,50),"END AT THE REQUIRED MAGNIFICATION"
    draw string(20,80),"LEFT CLICK TO SHIFT IMAGE"
    draw string(20,110),"ESC OR RIGHT CLICK TO END"
   
    framecounter
   
    Screenunlock
    Sleep 1,1
   
Loop Until i=Chr(27)
'Running code for newsprite.bas
print #2," "

print #2,"screen 19,32"
print #2,"dim as double magnification"
print #2,"magnification= ";mw/10
print #2,"Type bitmap_size"
print #2,"As Integer across,down"
print #2,"End Type"

print #2,"sub read_data(mybitmap as bitmap_size)"
print #2,"dim as uinteger temp"
print #2,"for x as integer=0 to mybitmap.across"
print #2,"for y as integer=0 to mybitmap.down"
print #2,"read a(x,y)"
print #2,"next y"
print #2,"next x"
print #2,"end sub"

print #2,"dim shared as any pointer image"
print #2,"image=imagecreate(magnification*ubound(a,1),magnification*ubound(a,2))"

print #2,"Sub drawbitmap_to_image(mybitmap As bitmap_size,scale as single=1,mx As Integer=0,my As Integer=0)"
print #2,"#macro magnify(pivotx,pivoty,px,py,scale)"
print #2,"var rotx=scale*(px-pivotx)+pivotx"
print #2,"var roty=scale*(py-pivoty)+pivoty"
print #2,"#endmacro"
print #2,"For x As Integer=mx To mx+mybitmap.across"
print #2,"For y As Integer=my To my+mybitmap.down"
print #2,"magnify(mx,my,x,y,scale)"
print #2,"line image,(rotx-scale/2,roty-scale/2)-(rotx+scale/2,roty+scale/2),a(x-mx,y-my),BF"
print #2,"Next y"
print #2,"Next x"
print #2,"End Sub"

print #2,"Dim As bitmap_size bitmap_info"
print #2,"bitmap_info.across=ubound(a)"
print #2,"bitmap_info.down=ubound(a,2)"
print #2,"read_data(bitmap_info)"
print #2,"drawbitmap_to_image(bitmap_info,magnification)"
print #2,"'BITMAP image is now in image"
print #2,"'This just displays the image"
print #2,"dim as string i"
print #2,"Do"
print #2,"i=inkey"
print #2,"Screenlock"
print #2,"Cls"
print #2,"locate 2,2"
print #2,"print ""magnification ="";";mw/10
print #2,"put(200,150),image,pset"
print #2,"Screenunlock"
print #2,"Sleep 1,1"
print #2,"Loop Until i=Chr(27)"

print #2,"imagedestroy image"

'shell "notepad mysprites.bas"
'Sleep

Here's an example of some ways to view the data (sorting,reversing).
But you can paste data from newsprite.bas and investigate it any way you wish.

Code: Select all


'Copied and pasted from newsprite.bas
''redim shared as uinteger a(64,45) this is from newsprite.bas
DATA _
&HFFFFFFFF,&HFFFFFFFF,&HFFFFFFFF,&HFFFFFFFF,&HFFFFFFFF,&HFFFFFFFF,&HFFFFFFFF,&HFFFFFFFF,_
&HFFFFFFFF,&HFFFFFFFF,&HFFFFFFFF,&HFFFFFFFF,&HFFFFFFFF,&HFFFFFFFF,&HFFFFFFFF,&HFFFFFFFF,_
&HFFFFFFFF,&HFFFFFFFF,&HFFFFFFFF,&HFFFFFFFF,&HFFFFFFFF,&HFFFFFFFF,&HFFFFFFFF,&HFFFFFFFF,_
&HFFFFFFFF,&HFFFFFFFF,&HFFFFFFFF,&HFFFFFFFF,&HFFFFFFFF,&HFFFFFFFF,&HFFFFFFFF,&HFFFFFFFF,_
&HFFFFFFFF,&HFFFFFFFF,&HFFFFFFFF,&HFFFFFFFF,&HFFFFFFFF,&HFFFFFFFF,&HFFFFFFFF,&HFFFFFFFF,_
&HFFFFFFFF,&HFFFFFFFF,&HFFFFFFFF,&HFFFFFFFF,&HFFFFFFFF,&HFF000000,&HFFFFFFFF,&HFFFFFFFF,_
&HFFFFFFFF,&HFFFFFFFF,&HFFFFFFFF,&HFFFFFFFF,&HFFFFFFFF,&HFFFFFFFF,&HFFFFFFFF,&HFFFFFFFF,_
&HFFFFFFFF,&HFFFFFFFF,&HFFFFFFFF,&HFFFFFFFF,&HFFFFFFFF,&HFFFFFFFF,&HFFFFFFFF,&HFFFFFFFF,_
&HFFFFFFFF,&HFFFFFFFF,&HFFFFFFFF,&HFFFFFFFF,&HFFFFFFFF,&HFFFFFFFF,&HFFFFFFFF,&HFFFFFFFF,_
&HFFFFFFFF,&HFFFFFFFF,&HFFFFFFFF,&HFFFFFFFF,&HFFFFFFFF,&HFFFFFFFF,&HFFFFFFFF,&HFFFFFFFF,_
&HFFFFFFFF,&HFFFFFFF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FFFFFFFF,&HFFFFFFFF,_
&HFFFFFFFF,&HFFFFFFFF,&HFFFFFFFF,&HFFFFFFFF,&HFFFFFFFF,&HFFFFFFFF,&HFFFFFFFF,&HFFFFFFFF,_
&HFFFFFFFF,&HFF000000,&HFFFFFFFF,&HFFFFFFFF,&HFFFFFFFF,&HFFFFFFFF,&HFFFFFFFF,&HFFFFFFFF,_
&HFFFFFFFF,&HFFFFFFFF,&HFFFFFFFF,&HFFFFFFFF,&HFFFFFFFF,&HFFFFFFFF,&HFFFFFFFF,&HFFFFFFFF,_
&HFFFFFFFF,&HFFFFFFFF,&HFFFFFFFF,&HFFFFFFFF,&HFFFFFFFF,&HFFFFFFFF,&HFFFFFFFF,&HFFFFFFFF,_
&HFFFFFFFF,&HFFFFFFFF,&HFFFFFFFF,&HFFFFFFFF,&HFFFFFFFF,&HFFFFFFFF,&HFFFFFFFF,&HFFFFFFFF,_
&HFFFFFFFF,&HFFFFFFFF,&HFFFFFFFF,&HFFFFFFFF,&HFFFFFFFF,&HFFFFFFFF,&HFFFFFFFF,&HFFFFFFFF,_
&HFFFFFFFF,&HFFFFFFFF,&HFFFFFFFF,&HFFFFFFFF,&HFFFFFFFF,&HFFFFFFFF,&HFFFFFFFF,&HFF000000,_
&HFF000000,&HFF000000,&HFF000000,&HFF000000,&HFF000000,&HFF000000,&HFF000000,&HFF000000,_
&HFF000000,&HFF000000,&HFF000000,&HFF000000,&HFF000000,&HFF000000,&HFF000000,&HFF000000,_
&HFF000000,&HFF000000,&HFF000000,&HFF000000,&HFF000000,&HFF000000,&HFF000000,&HFF000000,_
&HFF000000,&HFF000000,&HFF000000,&HFF000000,&HFF000000,&HFF000000,&HFF000000,&HFF000000,_
&HFF000000,&HFF000000,&HFF000000,&HFF000000,&HFF000000,&HFF000000,&HFF000000,&HFF000000,_
&HFF000000,&HFF000000,&HFF000000,&HFF000000,&HFF000000,&HFF000000

'SOME MACROS
#macro combsort(array)
Scope
    Dim As Integer size=Ubound(array),switch,j
    Dim As Single void=size
    Do
        void=void/1.3: If void<1 Then void=1
        switch=0
        For i As Integer =1 To size-void
            j=i+void
            If array(i)>array(j) Then Swap array(i),array(j): switch=1
        Next
    Loop Until  switch =0 And void=1
End Scope
#endmacro

#macro reverse(s)
For n As Long=Lbound(s) To Int((Lbound(s)+Ubound(s))/2):Swap s(n),s(Ubound(s)+Lbound(s)-n):Next
    #endmacro
   
  #macro display(s,caption,timetaken)
    Print
    Print "_____ "&caption &" ________"
    Print
    For z As Integer=1 To 20:Print s(z):Next
        For z As Integer=1 To 5:Print ".":Next
            For z As Integer=(Ubound(s)-20) To Ubound(s):Print s(z):Next
                Print
                Print "___ TIME for " &caption &"  " &timetaken &" ______"
                Print
    #endmacro 
'_______________________________________________________
 
 
  dim as integer count       
redim arr(1 to 64*45) as uinteger 'dimension taken from top of data
for x as integer=1 to 64*45
        count=count+1
    read arr(count)
next x

combsort(arr)

display(arr,"sorted"," N/A")

reverse(arr)

display(arr,"reversed"," N/A")
print "Number of data elements ";ubound(arr)


sleep

TESLACOIL
Posts: 1769
Joined: Jun 20, 2010 16:04
Location: UK
Contact:

i had fun with those

Postby TESLACOIL » Aug 08, 2011 23:27

thanx i had fun with those progs , some useful code to


The prog below is fun & informative to play with , it redraws the original picture 1 colour at a time thus revealing how its constructed ( got some junk code still left in it just ignore it ) I just posted as is

note how long! it takes to complete , it doesn't check to see if the same colour has already occurred but it avoids checking 307200 pixels x 64,000 colours worth of ' if then' checks if you used a look uptable ( i think there's a quicker duplication test than this anyway, something im working on)

1=perfect copy, takes many minutes to complete on my p4
10 = pixelated copy fraction of a second

Q any clues how to avoid duplication in an efficient manner ?



Code: Select all

dim as integer i,ii,c,cc,ccc,x,y,fnum , xx,yy , zstep
dim as ulongint col
'dim as uinteger col
dim as string ltype

dim freq (34000) as ulongint
dim cval (34000) as ulongint
dim firstpixel as ulongint

dim p1 as ulongint
dim p2 as ulongint
dim f as integer
dim add1 as integer
dim nextpos as integer
dim notfound as integer
dim counter as integer

counter = 1
notfound =9999


screenres 1300, 700,16 ':sleep :end


 
   
    input " zstep 1 to 10 ";zstep  ' 1 NEEDS A VERY FAST COMPUTER
    if zstep=0 then zstep=20
   
    bload "test2.bmp" ' drop a 640x480 16bit bmp in the same folder as the exe

 for yy= 0 to 479 step zstep
    for xx = 0 to  639 step zstep

    firstpixel= point (xx,yy) ': ? firstpixel : sleep: end
   
 
 
 for y= 0 to 479 step zstep
    for x = 0 to  639 step zstep
       
       
        col = point (x,y)
       
        if firstpixel=col then counter = counter + 1 : line (x+650+zstep-1,y) -(x+650,y+zstep-1), col,bf:end if
       
        'locate 68,5: ? counter
        'locate 70,5:  ? col :sleep 1
     
       
       
        next x
    next y
   
     next xx
    next yy
   
   
    ? "done" : sleep : end

dodicat
Posts: 6390
Joined: Jan 10, 2006 20:30
Location: Scotland

Re: i had fun with those

Postby dodicat » Aug 10, 2011 1:35

TESLACOIL wrote:thanx i had fun with those progs ----


Q any clues how to avoid duplication in an efficient manner ?



Hi TESLACOIL
Thanks for the code.
I think that you can get away with only a single run at the x,y pixels.
Just drag your bitmap onto the exe file of this code, and there's an option to scale.

Code: Select all


Type pixel_data
    As Integer Xpos,Ypos
    as uinteger colour
End Type
Function size(bmp As String) As pixel_data 'fetch bitmap width/height
    Dim As Integer w,h
    Open bmp For Binary As #1
    Get #1, 19, w
    Get #1, 23, h
    Close #1
    Return Type<pixel_data>(w,h)
End Function
#macro magnify(pivotx,pivoty,px,py,scale)
    var rotx=scale*(px-pivotx)+pivotx
    var roty=scale*(py-pivoty)+pivoty
    #endmacro
dim as integer i,ii,c,cc,ccc,x,y,fnum , xx,yy
dim as single zstep
dim as ulongint col
'dim as uinteger col
dim as string ltype

dim freq (34000) as ulongint
dim cval (34000) as ulongint
dim firstpixel as ulongint

dim p1 as ulongint
dim p2 as ulongint
dim f as integer
dim add1 as integer
dim nextpos as integer
dim notfound as integer
dim counter as integer

counter = 1
notfound =9999


screenres 1300, 700,16 ':sleep :end

dim as string picture=command(1)'"autumnbmp.bmp"
  dim as single mag
   
    input " zstep 1 to 10 ";zstep  ' 1 NEEDS A VERY FAST COMPUTER ??
    input "Magnification ";mag
    if zstep=0 then zstep=20
    if mag<=0 then mag=.5
   
    bload picture
dim as pixel_data sz=size(picture)
dim as integer start=0
dim as integer finishx=sz.xpos
dim as integer finishy=sz.ypos

 for y= 0 to finishy step zstep
    for x = 0 to  finishx step zstep

    'firstpixel= point (xx,yy) ': ? firstpixel : sleep: end
   
 
 
 'for y= 0 to finishy step zstep
    'for x = 0 to  finishx step zstep
       
       
        col = point (x,y)
       
        'if firstpixel=col then
        'counter = counter + 1
        magnify(sz.xpos,0,(x+sz.xpos),y,mag)
        line (rotx+mag*(zstep)/2,roty+mag*(zstep)/2) -(rotx-mag*(zstep)/2,roty-mag*(zstep)/2), col,bf
       
        'end if
        'locate 68,5: ? counter
        'locate 70,5:  ? col :sleep 1
     
       
       
        'next x
    'next y
   
     next x
    next y
   
   
    ? "done" : sleep : end

 
TESLACOIL
Posts: 1769
Joined: Jun 20, 2010 16:04
Location: UK
Contact:

im in the process of building

Postby TESLACOIL » Aug 13, 2011 2:26

Im in the process of building an i5 2500K number crunching monster. This will help me overcome some of the bottle necks im facing with my AI project.

Slowly but surely my computer network is being shoehorned by bottlenecks into an infrastructure that closely resembles the human brain. Mother nature is such a cunning cheat its that i rarely get the chance to beat her at her own game. ....biatch ! lol

Ive just spent the last few days brushing up on evolutionary biology & burning my old computer programming books...again

The colour data i was after is starting to emerge, im now rearranging cpu loads (yet again) to suit the data load. The big issue with strong AI is aligning the hardware to match the problem, until you know the size and shape of problem, aka whats is realy out there 'data stream' wise you cant build the solution.
MichaelW
Posts: 3500
Joined: May 16, 2006 22:34
Location: USA

Postby MichaelW » Aug 13, 2011 5:22

How are you creating test2.bmp as a 16-bit bitmap?
TESLACOIL
Posts: 1769
Joined: Jun 20, 2010 16:04
Location: UK
Contact:

I have some software which captures pics from my webcam

Postby TESLACOIL » Aug 13, 2011 6:28

Im not > I have some software which captures pics from my webcam at roughly 5 frames a second . 640 x 480 at 24bit 96 dpi hoz+vertical ( mouse right click properties win xp ) The software saves the *.bmp pics into a folder for me 901kb in size

i use the bload command to get the 24bit *.bmps into my freebasic prog ,
they seem to load ok when fb is set to 16bit mode

ive not done a pixel colour analysis as yet between the original bmp file and what i see in the fb program window. Ill take a screen shot if its important and find out

i think FreeBASIC snoops the palette or whatever in the *.bmp file and does whatever it does or not ? to the pallete in fb prior to loading the data and displaying it as a picture



Note if i use bsave on the imported bmp and then bload the bsaved file the colours DO change. See prog below

Code: Select all


dim i as integer

'screenres 1300, 700, 15
screenres 1300, 700, 16
'screenres 1300, 700, 24
'screenres 1300, 700, 32
'screenres 1300, 700, ??





bload "test1.bmp"
bsave "saved.bmp",0
? "saved" :sleep

bload "saved.bmp"
?"if in 15/16 bit mode colours change after loadeding back in using bsave 'saved.bmp',0"

bsave "saved.bmp",0
? "saved again" :sleep


bload "saved.bmp"
?"colours now seem to stay the same on after second load and save"
sleep
? " now doing test loop of saves and loads check for colour degredation "
for i = 1 to 60
    bsave "saved.bmp",0
    bload "saved.bmp"
    ? i
    next i

sleep:end


I might have to bload , bsave and then bload each picture (sighs out loud @ 5fps+ ) in order to get the colours to stick. If you run the prog again but set fb to 24bit the colours seem to stick ( stay the same) all the way through




Main Goal
Im trying to capture pictures at the lowest useful size and color count and frame rate eg 640x480 16bit @ 5fps (possibly 12 bit colour would work) Im just using 1 camera

1024x768 32bit @ 10 fps (with multiple cameras some set at lower capture rates and sizes) would be better , but the computing costs are a tad high ......i am considering a 2 cam system 1 lo res in B&W high frame rate @ 10-20 fps+ the other hi res at 640x480 @ 3-5fps

having captured at whatever specs, i then need to run fast analysis and also deep analysis and do so as close to real time as possible (which is why i have a computer network set aside for this task)

some of the analysis can be carried out on picture files that are LATER shrunk in size or reduced in color or both ( reducing the size of the files is important as ive got umpteen megabytes of data flying across the network )

Ive got around 5 freebasic gigaflops (see speedtest8.exe ) to throw at the vision tasks. I might be able to push this to 10 if there is no other way. Currently 3 P4s, 2 Dual cores & one Quad core dealing with just the vision.

The AI system runs for a couple of hours at a time and generates about a million files a session and terabytes of data which is sifted again post session before the decks are cleared.
Last edited by TESLACOIL on Aug 13, 2011 8:40, edited 3 times in total.
dafhi
Posts: 1335
Joined: Jun 04, 2005 9:51

Postby dafhi » Aug 14, 2011 18:54

Between my own projects I've been trying to work out a sub which does what you describe.

The tricky part is flattening out the vertical lines representing repeat color values
dafhi
Posts: 1335
Joined: Jun 04, 2005 9:51

Re: Advice wanted ref sort routines & spectrum analysis

Postby dafhi » Mar 08, 2012 14:18

Yo, Coil. Not sure if you got this.

Code: Select all

' -------------------------------------- '
'             histogram sort             '
'                                        '

Type ValCount
As Integer   Valu,c
End Type

Type Bounds
As Integer   Hi,Lo
End Type

Dim Shared As Integer   PtTo(&HFFFF),ubstat
Dim Shared As ValCount   Stats(&HFFFF)
Dim Shared As ValCount   stat(&HFFFF)
Dim Shared As Bounds   pixHiLo,CountHiLo

#Macro zHiLo(pVal,pHi,pLo)
If pVal > pHi Then
    pHi = pVal
ElseIf pVal < pLo Then
    pLo = pVal
EndIf
#EndMacro

#Macro zHiLo_Init(pVal,zBounds)
zBounds.Hi=pVal:zBounds.Lo=pVal
#EndMacro

Sub HistogramSort (A() As UShort)

    Dim As Integer   I=-1,J,K
    Dim As UShort ptr   Y = @A(0)
    Dim As Integer   count(&HFFFF)

    zHiLo_Init( *Y, pixHiLo )
   
    For Y = @A(0) To @A(UBound(A))
        count(*Y) += 1
        zHiLo( *Y, pixHiLo.Hi, pixHiLo.Lo )
    Next
   
    zHiLo_Init( 1, CountHiLo )
    For J = pixHiLo.Lo To pixHiLo.Hi
        If count(J) > 0 Then
            K = count(J)
            I += 1
            stat(I).c = K
            stat(I).Valu = J
            zHiLo( K, CountHiLo.Hi, CountHiLo.Lo )
        End If
    Next
    ubstat = I
   
    For I = CountHiLo.Lo To CountHiLo.Hi
        count(I) = 0
    Next
   
    For I = 0 To ubstat
        count(stat(I).c) += 1
    Next
   
    I = 0
    For J = CountHiLo.Lo To CountHiLo.Hi
        If count(J) > 0 Then
            K = count(J)
            PtTo(J) = I
            I += K
        EndIf
    Next
   
    For I = 0 To ubstat
        J = stat(I).c
        K = PtTo(J)
        PtTo(J) += 1
        Stats(K) = stat(I)
    Next

End Sub

'                          '
' ------------------------ '


' ------------------------ '
'          Usage           '
'                          '

ScreenRes 515,360,32

Dim A() as UShort
Dim as Integer N, X, C, Frame, GraphRGB = RGB(128,255,128)

dim as UShort  MaxValue = 500
dim as UShort  ScaleGraph = 10

For Frame = 1 To 100

    ReDim A(MaxValue)
   
    For X = 0 To UBound(A)
        A(X) = Rnd * MaxValue
    Next
    HistogramSort A()
   
    ScreenLock
   
    Cls
   
    X = 0
    For N = ubstat to 0 step -1
        C = Stats(N).c * ScaleGraph
        Line (X,359)-(X,359-C), GraphRGB
        X += 1
    Next
   
    ScreenUnLock
   
    Sleep 1

Next Frame

Sleep
TESLACOIL
Posts: 1769
Joined: Jun 20, 2010 16:04
Location: UK
Contact:

Re: Advice wanted ref sort routines & spectrum analysis

Postby TESLACOIL » Mar 09, 2012 7:22

spectrum.bas(92) warning 25(0): Overflow in constant conversion , line 92


it sorta ran...sorta
dafhi
Posts: 1335
Joined: Jun 04, 2005 9:51

Re: Advice wanted ref sort routines & spectrum analysis

Postby dafhi » Mar 14, 2012 23:42

Here's an update. demo shows a sorted histogram of rand values

[update 3] - updated comment on Usage Information

Code: Select all

' --------------------------------------------------------------------- '
'       histogram sort information                                      '
'                                                                       '

Type my_data_type           as UByte '<-- change to match input type

'' the following 2 vars let you define a search range, but typically,
' you'll want to leave these at -1
Dim Shared as Integer       MaxValue = -1
Dim Shared as Integer       MinValue = -1

' truncates to N most frequent values
Dim shared as Integer       ImportantFreqN = 300

'' analysis goes to result():
Type ValCount
    As my_data_type         val
    As UInteger               f
End Type   
dim shared as Integer       ubstat
dim shared as ValCount      result()

'                                                   '
'  scroll to line 176 for usage information         '
' ------------------------------------------------- '

' ============================ internal ================================

' ------------------------ '
'         internal         '
'                          '

dim shared as integer       mMaxVal: mMaxVal = MaxValue
dim shared as integer       mMinVal: mMinVal = MinValue
dim shared as integer       mImportantFreqN: mImportantFreqN = ImportantFreqN - 1
if mImportantFreqN < 0 then mImportantFreqN = 0

if mMinVal < 0 and mMaxVal < 1 Then
    dim as uinteger         lenMyData = Len(my_data_type)
    if lenMyData = 4 then lenMyData = 3
    mMaxVal = 2^(8*lenMyData) - 1
else
    mMaxVal = MaxValue
    if mMaxVal > &HFFFFFF then mMaxVal = &HFFFFFF
end if

if mMinVal < 0 then mMinVal = 0
if mMinVal > mMaxVal then mMinVal = mMaxVal

Dim Shared As UInteger      count_v(mMinVal To mMaxVal)
Dim Shared As UInteger      count_f()
dim shared as UInteger      write_to()
Dim shared as UInteger      mArySizeP
dim shared as ValCount      prelim()
dim shared as integer       lbRES

Sub z_HistogramSort_Init( data_() as my_data_type )
   
    Dim as Integer Delta_ = UBound(data_)
    If Delta_ <> mArySizeP Then
        mArySizeP = Delta_
        Redim result(0 To Delta_)
        Redim prelim(0 To Delta_)
        Redim count_f(1 to Delta_)
        Redim write_to(1 to Delta_)
        lbRES = LBound(result)
    End If
   
End Sub

Sub z_Shuffle_To_Result( data_() As my_data_type )

    ubstat = lbRES - 1
    if MinValue > 0 or MaxValue > -1 then
       
        For pval_ as my_data_type ptr = @data_(0) to @data_( UBound(data_) )
            If *pVal_ <= mMaxVal Then
                If *pVal_ >= mMinVal Then
                    count_v( *pval_ ) += 1
                    If count_v( *pval_ ) = 1 Then
                        ubstat += 1
                        prelim(ubstat).Val = *pval_
                    End If
                End If
            End If
        Next

    else
        For pval_ as my_data_type ptr = @data_(0) to @data_( UBound(data_) )
            count_v( *pval_ ) += 1
            If count_v( *pval_ ) = 1 Then
                ubstat += 1
                prelim(ubstat).Val = *pval_
            End If
        Next
    end if
   
End Sub

'                          '
'         internal         '
' ------------------------ '

' -------------------------------------- '
'         histogram sort                 '
'                                        '

#Macro MinMax(f_)
    if f_ > max_ then
        max_ = f_
    elseif f_ < min_ Then
        min_ = f_
    end if
#EndMacro

Sub HistogramSort( data_() As my_data_type )

    z_HistogramSort_Init( data_() )
   
    z_Shuffle_To_Result data_()
   
    dim as integer          max_ = count_v(prelim(0).Val)
    dim as integer          min_ = max_
    dim as ValCount Ptr     p_vc

    For J as integer = lbRES to ubstat
        p_vc = @prelim(J)
        p_vc->f = count_v(p_vc->Val)
        count_f(p_vc->f) += 1
        count_v(p_vc->Val) = 0
        MinMax(p_vc->f)
    next

    dim as integer          volume = ubstat + 1
    dim as uinteger ptr     ptf_
    if volume > mImportantFreqN then volume = mImportantFreqN

    For F as integer = max_ to min_ step -1
        ptf_ = @count_F(F)
        if volume > 0 Then
            write_to(F) = volume - 1
            volume -= *ptf_
            if volume < 0 Then
                *ptf_ += volume
            end if
        else
            *ptf_ = 0
        end if
    Next

    For J as integer = lbRES to ubstat
        p_vc = @prelim(J)
        ptf_ = @count_F(p_vc->f)
        if *ptf_ > 0 Then
            *ptf_ -= 1
            ptf_ = @write_to(p_vc->f)
            result(*ptf_) = prelim(J)
            *ptf_ -= 1
        end if
    Next

    if ubstat > mImportantFreqN then ubstat = mImportantFreqN

End Sub

'                                        '
'         histogram sort                 '
' -------------------------------------- '

' ================== Usage Information =================== '

                             ''my_data_type defined at document start
Dim some_data()             as my_data_type

Randomize , 3

' This gets called inside the loop
Sub FrameData(data_() as my_data_type, ByVal Algo_ as integer = 0)
   
    ' Load your data in here
   
    'I'll create random data in the meantime ..
    if Algo_ = 0 then
        For I as integer = 0 To UBound(data_)
            data_(I) = Int(mMinVal + Rnd * (mMaxVal - mMinVal) + 1)
        Next
    else
        dim as double LI
        dim as ulongint ptr pL = @LI
        For I as integer = 0 To UBound(data_)
            LI = Timer
            data_(I) = *pL and mMaxVal
        Next
    end if

End Sub

'' visualize the output
dim as integer  scr_w = 360
dim as integer  scr_h = 360, ybase

screenres scr_w, scr_h, 32

ReDim some_data(640 * 480)

dim as single       M, ScaleGraph_Y = 20 * sqr( sqr(mMaxVal) / ubound(some_data) )

dim as Uinteger     X, N, C, GraphRGB = RGBA(128,255,128,255)

For Frame as integer = 1 to 1

    ' analyze the array
   
    screenlock
    cls
    FrameData some_data(), 1
    HistogramSort some_data()
   
    ScaleGraph_Y = 20 * sqr( sqr( mMaxVal - mMinVal ) / ( ubound(some_data) ) )

    X = 0
    ybase = scr_h - 1
    For N = 0 to ubstat
        C = Int(result(N).f * ScaleGraph_Y+0.5)
        Line (X,ybase)-(X,ybase-C), GraphRGB
        X += 1
    Next
   
    screenunlock
   
    sleep 1 + rnd * 5

Next

Sleep

Return to “General”

Who is online

Users browsing this forum: No registered users and 3 guests