09-10-2024, 07:39 PM
(translated by Google translator)
Hi all.
Today I tried playing football with a robot that detects the position of the ball on the field using vision.
On my tablet, the "LDImage.FindImageInImage()" function clearly does not have time to find even one white pixel in the required area of the graphics window.
If the game loop becomes shorter than 100 milliseconds, then the robot loses sight of the ball.
Since, probably, the "LDImage.FindImageInImage()" function searches for an image in an image by checking each pixel, then I hope to achieve my goal using the "LDGraphicsWindow.GetPixel()" function.
The ball has a diameter of 20 pixels.
So I think if I search for a white pixel of the ball on the playing field with a step of 10 pixels horizontally and vertically, the program will have to check 100 times fewer pixels.
I hope this will allow us to find the ball quickly enough.
( if anyone is interested, I can post the current version with the big-eyed robot so you can try your ideas or find my mistakes )
Hi all.
Today I tried playing football with a robot that detects the position of the ball on the field using vision.
On my tablet, the "LDImage.FindImageInImage()" function clearly does not have time to find even one white pixel in the required area of the graphics window.
If the game loop becomes shorter than 100 milliseconds, then the robot loses sight of the ball.
Since, probably, the "LDImage.FindImageInImage()" function searches for an image in an image by checking each pixel, then I hope to achieve my goal using the "LDGraphicsWindow.GetPixel()" function.
The ball has a diameter of 20 pixels.
So I think if I search for a white pixel of the ball on the playing field with a step of 10 pixels horizontally and vertically, the program will have to check 100 times fewer pixels.
I hope this will allow us to find the ball quickly enough.
( if anyone is interested, I can post the current version with the big-eyed robot so you can try your ideas or find my mistakes )