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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T22:13:07+00:00 2026-05-30T22:13:07+00:00

I am trying to use the function ROI in OpenCV to identify a contour,

  • 0

I am trying to use the function ROI in OpenCV to identify a contour, later .. in that ROI I am identifying a specific color.. so I want to draw rectangle or circle around this shape but in the original image .. the problem that the location I am retrieving is for the ROI and not the whole image .. any ideas ?

  • 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-30T22:13:09+00:00Added an answer on May 30, 2026 at 10:13 pm

    You know the offset of the ROI within the original image (say the coordinates of its top-left corner) — just add these to the coordinates of the location within the ROI (ie where the top-left corner of the ROI is (0,0)), and that gives the location in global coordinates.

    e.g.:

     ______________
    |    __        |
    |   |  |       |
    |   |x_|       |
    |______________|
    

    Say the outer rectangle is the image, top-left corner (0,0), and the inner square is the ROI, top-left corner (1,3).

    The X is the location of the thing you want to outline – it has coordinates (1,0) with respect to the square.

    Add (1,0) (X coordinates with respect to ROI) to the (1,3) (ROI coordinates with respect to image) and you’ll get (2,3), the coordinates of X with respect to the image.

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

Sidebar

Related Questions

I'm trying to use this function in a C program that needs to be
I'm trying to use the function [context].startSubActivity([intent i]) but that won't compile. Apparently startSubActivity()
I'm trying to use a function that has the following signature to sign a
I want to delete file from my program. Trying to use this function but
Im trying to use function that i put in remote server Now in testing
I'm trying to use changePage function in jQuery Mobile, but I want the page
I am trying to use system function. The command that I execute return multiple
Hey guys i'm trying to use drawString() function to draw the result from a
I am trying to use this function from a COM API which enables the
I'm trying to use the function XLookupString . According to the documentation , it

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.