Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 979537
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T04:14:05+00:00 2026-05-16T04:14:05+00:00

I need to learn about 2D pattern searching algorithms. Tips and links greatly appreciated.

  • 0

I need to learn about 2D pattern searching algorithms. Tips and links greatly appreciated.

More to the point:

Given a matrix of M[m,n] with values in K
example

000000000000
000001000000
010100010010 = M, K = {0, 1}
010100010001
101111010111

and a matrix L[i, j] with values in K + {X} representing a "shape"
example, the shape of letter "L"

1X
1X = L
11

What algoritms can answer to the following questions:

  1. Can L be found in M ?
  2. How many times L can be found in M (disjunctive L’s, no common pieces (1’s or 0’s))
  3. How many times L can be found in M (can have common pieces (1’s or 0’s))
  4. How many times L, and K (K is defined similarly like L, K != L) can be found in M (disjoint)
    etc.

The language of implementation is to be JavaScript, but any other will do.

EDIT
Also found this PDF.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T04:14:05+00:00Added an answer on May 16, 2026 at 4:14 am

    Take a look at this presentation it should give you a basic knowledge.

    The X symbol can be treated like wildcard so it will always give a match.

    Don’t know what exactly you mean by

    How many times L, and K (K is defined like L) can be found in M (disjoint) etc.

    K stands for alphabet or shape (like L)?

    Problem of determining maximum number of disjoint matches will be harder. The approach would be following:

    • find all possible matches
    • create graph where node represents matches and edge represents that two matches have common field.
    • now you have to find maximum independent set in this graph (wiki) – set of vertices in a graph, no two of which are adjacent so problem constraints are not violated.

    EDIT: If your shape is L the match can be computed efficently. Create tables for columns and rows and for each cell check if there is a match upwards and to the right.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to learn about Cryptography theory (basics) and I want to use the
Sorry I am a noob, I am trying to learn about sqlite databases using
When MVC first came out, I was reading about it everyday and learning all
I need a reporting capability in my web application. I have googled the net
All I need to do is have a form that does this: User enters
The two posts below are great examples of different approaches of extracting data from
Im new in OOP programming and C++ and Im currently into learning design patterns.
Possible Duplicate: Plain English explanation of Big O I can't find any sufficient help
I am just learning jquery, so this might be something easy. I am trying
I apologize if this has already been asked a different way but I couldn't

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.