Find known sub image in larger image

前端 未结 6 1418
谎友^
谎友^ 2020-12-13 03:13

Does anyone know of an algorithm (or search terms / descriptions) to locate a known image within a larger image?

e.g.

I have an image of a s

6条回答
  •  囚心锁ツ
    2020-12-13 03:48

    Here's the skeleton of code you'd want to use:

    // look for all (x,y) positions where target appears in desktop
    List findMatches(Image desktop, Image target, float threshold) {
      List locs;
      for (int y=0; y

    You could consider other image distances (see a similar question). For your application, the RMS error is probably a good choice.

    There are probably various Java libraries that compute this distance for you efficiently.

提交回复
热议问题