The idea is simple. I'm making a program that detects edges in an image. It will eventually be used for facial recognition software for the final project in my entry level programming class.
I need a way to loop through each pixel in an image without using row-major traversal; that is, I need a way to more efficiently run through each pixel than using the method of
This method is slow and taxing.
I know that in Java, you can use the much more efficient method
But I know not of any similar method in Visual Basic.
Should I convert the bitmap into a variable array first? I think that looking though a variable array may be way faster than looking though the pixels of an image, but converting the image into an array might take just as much time.
Any help?
I need a way to loop through each pixel in an image without using row-major traversal; that is, I need a way to more efficiently run through each pixel than using the method of
Code:
For yValue = 0 To oldImage.Height - 1
For xValue = 0 To oldImage.Width - 1
'Do something
Next
Next
I know that in Java, you can use the much more efficient method
Code:
for (Pixel p : image)
// do something
Should I convert the bitmap into a variable array first? I think that looking though a variable array may be way faster than looking though the pixels of an image, but converting the image into an array might take just as much time.
Any help?