I am trying to write the data as points for processing the image and I have an array which is full with the values as [r1,g1,b1,r2,g2,b2...].I mean this is a black and white image and I wrote the pixels in order(like:[255,255,255,000,000,000.....]) but I need to write the values as point for performing an algorithm.I tried to write the code but could not do this in the right way.
What I want is like -> result[i]=point(x,y).Is writing this code possible?What am I doing wrong with this code?
EDIT:I am trying to write a morphological algorithm(For writing Graham scan I need to find the points).I am triying to send the data as width(datawidth * 3 because it is in rgb format) and width.With this way I am trying to send 'width * 3' to x-coordinate and when I send it y-coordinate is gonna be 0 and when I send the second 'width * 3' y-coordinate is gonna be 1 and sorth of.That is what I am thinking about the code.
Here is the code:
List<Point> points = new List<Point>();
for (int i = 0; i < 500; i++)
{
byte dnm = 0;
for (int d = 0; d < 800*3; d++)
{
points(i,d)= result[dnm];
dnm++;
}
dnm++;
}