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 6546837
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T11:45:27+00:00 2026-05-25T11:45:27+00:00

I’m working on a way to handle hardware-based bitmap animation. As an input, I’ve

  • 0

I’m working on a way to handle hardware-based bitmap animation. As an input, I’ve got an image sequence of a simple bitmap (it’s not a video, it’s more like simple shapes, even though they might contain bitmap fills). I’m making a texture atlas of this animation (so it can be rendered quickly with GPU), and since this sequence sometimes has most part of it standing still while a small part of it is animating, I need an algorithm that can find the “common parts” between two images, so I can save memory.

The images might not have the same size (if an object is growing or shrinking, for example), so I need a way to detect the biggest common area between the two. I’ve seen this answer and it partly solves my problem. I’d like to know, though, if there is already a better algorithm for my case, specially because since the sizes can vary, one image is not necessarily contained within the other, but I’d need to find the common parts between the two.

  • 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-25T11:45:28+00:00Added an answer on May 25, 2026 at 11:45 am

    One problem I see is that one image can be contained in many ways in another, how do you determine the right answer?

    Does it have to be real-time? If not then you can do the simple O(n^4) search for it using a fitness function.

    The fitness function could be the error between the images (which gives a n^8 algorithm).

    UPDATE:
    Wrong analysis of me sorry. The search is n^2 and the fitness function is n^2 which gives n^4.

    The whole algorithm should look something like this:

    w1 = width of image 1
    w2 = width of image 2
    h1 = height of image 1
    h2 = height of image 2
    
    for x = -w1 to w1+w2
      for y = -h1 to h1+h2
        find max fitness(x,y)
    
    fitness(xc,yc){
      m=0
      for each x where image 1 overlaps image 2 displaced by xc
        for each y where image 1 overlaps image 2 displaced by yc
          if (image1[x][y] == image2[x+xc][y+yc])
            m += 1
      return m
    }
    

    UPDATE: Modified fitness function to find the number of overlaps, and then try to find the most overlaps.

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I've got a string that has curly quotes in it. I'd like to replace
Seemingly simple, but I cannot find anything relevant on the web. What is the
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
Configuring TinyMCE to allow for tags, based on a customer requirement. My config is
I need to clean up various Word 'smart' characters in user input, including but
i got an object with contents of html markup in it, for example: string
I need a function that will clean a strings' special characters. I do NOT
I am using Paperclip to handle profile photo uploads in my app. They upload

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.