aarnas / image-in-image Goto Github PK
View Code? Open in Web Editor NEWnpm package for finding an image as part of another image. In other words, picture-in-picture search.
Home Page: https://www.npmjs.com/package/image-in-image
npm package for finding an image as part of another image. In other words, picture-in-picture search.
Home Page: https://www.npmjs.com/package/image-in-image
Can you add an option to ignore all transparent pixels on the subimage, to find a png overlay on the full image?
I want to get buffer of dots of the screen, to check if there is a specific object in my screen.
using this lib to capture: https://github.com/Krombik/keysender#capture
const hwnd = new Hardware(null);
const bufferImageData1 = hwnd.workwindow.capture({ x: 0, y: 0, width: 500, height: 500 });
console.log(bufferImageData1);
const bufferImageData2 = hwnd.workwindow.capture({ x: 0, y: 0, width: 25, height: 25 });
console.log(bufferImageData2);
So Im using this modules capture https://github.com/Krombik/keysender#capture function and this modules https://www.npmjs.com/package/image-in-image/v/1.0.2 image-in-image detector.
const main = async () => {
const test2 = await findImage(
bufferImageData1,
bufferImageData2,
"image/png",
"image/png",
1 // optional aspect ratio, default 1
);
console.log(test2);
};
main();
I'm trying to capture my desktop and use the returned Buffer with pixels in both the bufferImageData1 and the bufferImageData2 variable (This is just for testing but its not working). Maybe i'm putting the wrong format in the findImage function? Idk. Any help?
I am getting this error
{
error: 500,
message: 'Something went wrong, might be that images path not right'
}
I get screenshot by adb and get the picture from stdout of adb, it's more convinient and efficient to pass buffer than saving it to an file then pass the filepath.
Thanks for your work,it helped me a lot.
Please add similarity option to allow some of the pixels to be different, sometimes I need to find some pictures that had been partially obscured.
{ error: 404, message: 'Image not found' }
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.