Hi All,
Well I also have similar problem, where data from objects properties is very time sensitive. I am trying to store a pixel with 5 more or attributes, and then form a new array based on the rules controlling any of the attributes.
Would you still recommend file database if I had excessive amount of RAM (solid state) and multiprocessor system ?
Could you please give an example how to fill up a 6 dimensional array with simple rules in VB? Much appreciate if you could, this is a hobby, although
I know that VB is not best for graphic programming, at the moment I am trying to understand the logic of how to be an efficient programmer and will learn other language later.
This is where I am at so far :
'Reading pixels from picture and displaying their color values
Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click ' Has one Picturebox, one ListBox and one button
ListBox1.Items.Clear()
ListBox1.Items.Add("Pixel Color Factor")
Dim img As Bitmap = New Bitmap(PictureBox1.Image) 'Storing jpg
Dim c As Color 'Extracting color
'Dim myPolygon(,,,,) As Integer How does this work ?
Dim countPix As Integer = 0 'Pixel counter
Dim writer As System.IO.StreamWriter
writer = System.IO.File.CreateText("myRecs.Txt")
TextBox2.Text = "W: " + img.Width.ToString + " H :" + img.Height.ToString 'Displaying pictures size in pixels
Dim j As Integer = 0
Do While (j < img.Height) 'Reading rows from jpg
Dim i As Integer = 0
Do While (i < img.Width) 'Reading columns from jpg
Dim valPix As Integer = 0
c = img.GetPixel(i, j)
Dim a As Integer = Convert.ToInt16(c.A)
Dim r As Integer = Convert.ToInt16(c.R)
Dim g As Integer = Convert.ToInt16(c.G)
Dim b As Integer = Convert.ToInt16(c.B)
valPix = Convert.ToInt16(c.R) + Convert.ToInt16(c.G) + Convert.ToInt16(c.B) 'Calculating sum of colors. I think we can call that brightness
'listing raw data x,y,amount of red,green and blue
ListBox1.Items.Add((i.ToString + ("," _
+ (j.ToString + (" " _
+ (r.ToString + (" " _
+ (g.ToString + (" " + b.ToString) + (" " + valPix.ToString)))))))))
'writing formated data for later use
writer.WriteLine("Index :" + countPix.ToString + " X : " + i.ToString + " Y : " + j.ToString + " Red : " + r.ToString + " Green : " + g.ToString + " Blue : " + b.ToString)
writer.WriteLine(" ")
i = (i + 5) 'High resolution image requires serious processing power, skipping 5 columns and 5 rows
countPix = (countPix + 5)
Loop
j = (j + 5)
Loop
writer.Close()
End Sub
Thank your for your time.

