Open arsize opened 3 years ago
You could try to use opencv, don't know if it's faster. Something like that:
const cv = require('opencv4nodejs');
let img = cv.imread(robot.screen.capture(0, 0, 1000, 1000));
let i = 1000;
let j = 1000;
let [b, g, r] = [0, 0 ,0];
while(i--) {
while(j--) {
[b, g, r] = img.atRaw(i, j); // BLUE GREEN RED [0-255]
};
};
img.release();
You could try to use opencv, don't know if it's faster. Something like that:
const cv = require('opencv4nodejs'); let img = cv.imread(robot.screen.capture(0, 0, 1000, 1000)); let i = 1000; let j = 1000; let [b, g, r] = [0, 0 ,0]; while(i--) { while(j--) { [b, g, r] = img.atRaw(i, j); // BLUE GREEN RED [0-255] }; }; img.release();
Thank you. It's really helpful.
Expected Behavior
I hope to get results within 100ms
Current Behavior
It takes me half an hour
Possible Solution
I have no solution,but I guess it is the problem of the function colorAt
Steps to Reproduce (for bugs)
Context
I cannot continue with my project...
Your Environment