Coder Social home page Coder Social logo

aarnas / image-in-image Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 0.0 170 KB

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

TypeScript 100.00%
image-recognition image-search npm-package picture-in-picture picture-recognition picture-search image-in-image image-recognition-algorithms image-recognition-tool image-find

image-in-image's People

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

image-in-image's Issues

How to get buffer of dots

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'
}

[Feature request]add similarity option

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.