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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T15:28:41+00:00 2026-05-30T15:28:41+00:00

I’m trying to write a program to track relative position of certain objects while

  • 0

I’m trying to write a program to track relative position of certain objects while I’m playing the popular game, League of Legends. Specifically, I want to track the x,y screen coordinates of any “minions” currently on the screen (The “minions” are the little guys in the center of the picture with little red and green bars over their heads).

I’m currently using the Java Robot class to send screen captures to my program while I’m playing, and am trying to figure out the best algorithm for locate the minions and track them so long as they stay on the screen.

My current thinking is to use a convolutional neural network to identify and locate the minions by the the colored bars over there heads. However, I’d have to re-identify and locate the minions on every new frame, and this seems like it’d be computationally expensive if I want to do this in real time (~10-60 fps).

These sorts of computer vision algorithms aren’t really my specialization, but it seems reasonable that algorithms exist that exploit the fact objects in videos move in a continuous manner (i.e. they don’t jump around from frame to frame).

So, is there an easily implementable algorithm for accomplishing this task?

enter image description here

  • 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-30T15:28:42+00:00Added an answer on May 30, 2026 at 3:28 pm

    Since this is a computer game, I think that the color of the bars should be constant. That might not be true only if the dynamic illumination affects the health bar, which is highly unlikely.

    Thus, just find all of the pixels with this specific colors. Then you do some morphological operations and segment the image into blobs. By selecting only the blobs that fit some criteria, you can find the location of the units.

    I know that my answer does not involve video, but the operations should be so simple, that it should be very quick.

    As for the tracking, just find per each point the closest in the next frame.

    Since the HUD location is constant, there should be no problem removing it. Image without HUD

    Here is mine quick and not-so-robust implementation in Matlab that has a few limitations:

    1. Units must be quite healthy (At least 40 pixels wide)
    2. The bars do not overlap.

     function FindUnits()
        x = double(imread('c:\1.jpg'));
        green = cat(3,149,194,151); 
    
        diff = abs(x - repmat(green,[size(x,1) size(x,2)]));
        diff =  mean(diff,3);
        diff = logical(diff < 30);
        diff = imopen(diff,strel('square',1));
    
        rp = regionprops(diff,'Centroid','MajorAxisLength','MinorAxisLength','Orientation');
        long = [rp.MajorAxisLength]./[rp.MinorAxisLength];
        rp( long < 20) = [];
    
        xy = [rp.Centroid];
        x = xy(1:2:end);
        y = xy(2:2:end);
        figure;imshow('c:\1.jpg');hold on ;scatter(x,y,'g');
    end
    

    And the results:

    enter image description here

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

Sidebar

Related Questions

I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I'm trying to use string.replace('’','') to replace the dreaded weird single-quote character: ’ (aka
I'm trying to create an if statement in PHP that prevents a single post
I am trying to render a haml file in a javascript response like so:

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.